git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #171487 from dotlambda/udiskie-2.4.2
851fd63Anderson Torres
pkgs/applications/misc/udiskie/default.nix+30−25
@@ -1,42 +1,47 @@
1{ lib
1{ lib
2+, asciidoc
2, fetchFromGitHub
3, fetchFromGitHub
3−, buildPythonApplication
4−, asciidoc-full
5−, docopt
6−, gettext
7, gobject-introspection
4, gobject-introspection
8, gtk3
5, gtk3
9−, keyutils
6+, installShellFiles
10, libappindicator-gtk3
7, libappindicator-gtk3
11, libnotify
8, libnotify
12, librsvg
9, librsvg
13−, nose
10+, python3
14−, pygobject3
15−, pyyaml
16, udisks2
11, udisks2
17, wrapGAppsHook
12, wrapGAppsHook
18}:
13}:
19
14
20−buildPythonApplication rec {
15+python3.pkgs.buildPythonApplication rec {
21 pname = "udiskie";
16 pname = "udiskie";
22− version = "2.4.0";
17+ version = "2.4.2";
18+
19+ format = "setuptools";
23
20
24 src = fetchFromGitHub {
21 src = fetchFromGitHub {
25 owner = "coldfix";
22 owner = "coldfix";
26 repo = "udiskie";
23 repo = "udiskie";
27 rev = "v${version}";
24 rev = "v${version}";
28− hash = "sha256-T4kMPMXfehZT7P+TOd1llR2TbHPA/quNL545xxlmJfE=";
25+ hash = "sha256-lQMJVSY3JeZYYOFDyV29Ye2j8r+ngE/ta2wQYipy4hU=";
29 };
26 };
30
27
31− outputs = [ "out" "man" ];
28+ patches = [
29+ ./locale-path.patch
30+ ];
31+
32+ postPatch = ''
33+ substituteInPlace udiskie/locale.py --subst-var out
34+ '';
32
35
33 nativeBuildInputs = [
36 nativeBuildInputs = [
34− asciidoc-full # Man page
37+ asciidoc # Man page
35− gettext
36 gobject-introspection
38 gobject-introspection
39+ installShellFiles
37 wrapGAppsHook
40 wrapGAppsHook
38 ];
41 ];
39
42
43+ dontWrapGApps = true;
44+
40 buildInputs = [
45 buildInputs = [
41 gobject-introspection
46 gobject-introspection
42 gtk3
47 gtk3
@@ -46,8 +51,9 @@ buildPythonApplication rec {
46 udisks2
51 udisks2
47 ];
52 ];
48
53
49− propagatedBuildInputs = [
54+ propagatedBuildInputs = with python3.pkgs; [
50 docopt
55 docopt
56+ keyutils
51 pygobject3
57 pygobject3
52 pyyaml
58 pyyaml
53 ];
59 ];
@@ -57,21 +63,20 @@ buildPythonApplication rec {
57 '';
63 '';
58
64
59 postInstall = ''
65 postInstall = ''
60− mkdir -p $man/share/man/man8
61− cp -v doc/udiskie.8 $man/share/man/man8/
66+ installManPage doc/udiskie.8
62 '';
67 '';
63
68
64− checkInputs = [
69+ preFixup = ''
65− keyutils
70+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
66− nose
67− ];
68−
69− checkPhase = ''
70− nosetests
71 '';
71 '';
72
72
73+ checkInputs = with python3.pkgs; [
74+ pytestCheckHook
75+ ];
76+
73 meta = with lib; {
77 meta = with lib; {
74 homepage = "https://github.com/coldfix/udiskie";
78 homepage = "https://github.com/coldfix/udiskie";
79+ changelog = "https://github.com/coldfix/udiskie/blob/${src.rev}/CHANGES.rst";
75 description = "Removable disk automounter for udisks";
80 description = "Removable disk automounter for udisks";
76 longDescription = ''
81 longDescription = ''
77 udiskie is a udisks2 front-end that allows to manage removeable media such
82 udiskie is a udisks2 front-end that allows to manage removeable media such
@@ -88,6 +93,6 @@ buildPythonApplication rec {
88 - password caching (requires python keyutils 0.3)
93 - password caching (requires python keyutils 0.3)
89 '';
94 '';
90 license = licenses.mit;
95 license = licenses.mit;
91− maintainers = with maintainers; [ AndersonTorres ];
96+ maintainers = with maintainers; [ AndersonTorres dotlambda ];
92 };
97 };
93}
98}
pkgs/applications/misc/udiskie/locale-path.patchnew file+17
@@ -0,0 +1,17 @@
1+diff --git a/udiskie/locale.py b/udiskie/locale.py
2+index f12bea9..450e38b 100644
3+--- a/udiskie/locale.py
4++++ b/udiskie/locale.py
5+@@ -10,10 +10,8 @@ from gettext import translation
6+ testdirs = [
7+ # manual override:
8+ os.environ.get('TEXTDOMAINDIR'),
9+- # editable installation:
10+- os.path.join(os.path.dirname(__file__), '../build/locale'),
11+- # user or virtualenv installation:
12+- os.path.join(sys.prefix, 'share/locale'),
13++ # Nix installation:
14++ os.path.join('@out@', 'share/locale'),
15+ ]
16+ testfile = 'en_US/LC_MESSAGES/udiskie.mo'
17+ localedir = next(
pkgs/top-level/all-packages.nix+1−1
@@ -29350,7 +29350,7 @@ with pkgs;
29350
29350
29351 udevil = callPackage ../applications/misc/udevil {};
29351 udevil = callPackage ../applications/misc/udevil {};
29352
29352
29353− udiskie = python3.pkgs.callPackage ../applications/misc/udiskie { };
29353+ udiskie = callPackage ../applications/misc/udiskie { };
29354
29354
29355 sacc = callPackage ../applications/networking/gopher/sacc { };
29355 sacc = callPackage ../applications/networking/gopher/sacc { };
29356
29356