File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ diff --git a/data/resources/plugins/meson.build b/data/resources/plugins/meson.build
2+ index ac60edd..9e055b8 100644
3+ --- a/data/resources/plugins/meson.build
4+ +++ b/data/resources/plugins/meson.build
5+ @@ -1,6 +1,7 @@
6+ plugins_conf = configuration_data()
7+ plugins_conf.set('APP_ID', application_id)
8+ plugins_conf.set('LOCALE_DOMAIN', gettext_package)
9+ + plugins_conf.set('LOCALE_DIR', localedir)
10+
11+ configure_file(
12+ input: 'packet_nautilus.py.in',
13+ diff --git a/data/resources/plugins/packet_nautilus.py.in b/data/resources/plugins/packet_nautilus.py.in
14+ index 9c5e71e..7288ee9 100755
15+ --- a/data/resources/plugins/packet_nautilus.py.in
16+ +++ b/data/resources/plugins/packet_nautilus.py.in
17+ @@ -23,7 +23,8 @@ def log(*vals: Any):
18+ # TODO: Maybe have a separate gettext package for plugin scripts that gets
19+ # copied over alongside the script. Seems more robust?
20+ def init_i18n() -> gettext.NullTranslations | gettext.GNUTranslations:
21+ - locale_dirs: List[Path | None] = [None] # None for system default locale dir
22+ + # `None` is for system default locale dir
23+ + locale_dirs: List[Path | None] = [None, Path("@LOCALE_DIR@")]
24+ (lang, enc) = locale.getlocale()
25+
26+ flatpak_info = None
Original file line number Diff line number Diff line change 2020 blueprint-compiler ,
2121 desktop-file-utils ,
2222 appstream ,
23+ python3Packages ,
2324} :
2425stdenv . mkDerivation ( finalAttrs : {
2526 pname = "packet" ;
26- version = "0.4.0 " ;
27+ version = "0.5.1 " ;
2728
2829 src = fetchFromGitHub {
2930 owner = "nozwock" ;
3031 repo = "packet" ;
3132 tag = finalAttrs . version ;
32- hash = "sha256-MnDXwgzSnz8bLEAZE4PORKKIP8Ao5ZiImRqRzlQzYU8 =" ;
33+ hash = "sha256-MZdZf4fLtUd30LncPLVkcNdjuzw+Wi33A1MJqQbEurk =" ;
3334 } ;
3435
36+ patches = [
37+ # let nautilus find the locale directory
38+ ./nautilus-extension-locale.patch
39+ ] ;
40+
3541 cargoDeps = rustPlatform . fetchCargoVendor {
3642 inherit ( finalAttrs ) pname version src ;
37- hash = "sha256-LlqJoxAWHAQ47VlYB/sOtk/UkNa+E5CQS/3FQnAYFsI =" ;
43+ hash = "sha256-ODrM8oGQpi+DpG4YQYibtVHbicuHOjZAlZ1wW2Gulec =" ;
3844 } ;
3945
4046 nativeBuildInputs = [
@@ -59,8 +65,17 @@ stdenv.mkDerivation (finalAttrs: {
5965 gdk-pixbuf
6066 libadwaita
6167 pango
68+ python3Packages . wrapPython
6269 ] ;
6370
71+ postFixup = ''
72+ buildPythonPath ${ python3Packages . dbus-python }
73+ patchPythonScript $out/share/packet/plugins/packet_nautilus.py
74+ # install the nautilus extension in the expected location
75+ mkdir -p $out/share/nautilus-python
76+ ln -s $out/share/packet/plugins $out/share/nautilus-python/extensions
77+ '' ;
78+
6479 meta = {
6580 description = "Quick Share client for Linux" ;
6681 homepage = "https://github.com/nozwock/packet" ;
You can’t perform that action at this time.
0 commit comments