git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #171487 from dotlambda/udiskie-2.4.2

udiskie: 2.4.0 -> 2.4.2

commit851fd63179a7c171ac2eb757fe83e88c4a48d886 authorAnderson Torres <torres.anderson.85@protonmail.com> dateWed 4 May 2022, 22:40 (5 years ago) parent31d2b31cc67617
3 files changed+48−26
pkgs/applications/misc/udiskie/default.nix+30−25 pkgs/applications/misc/udiskie/locale-path.patch+17 pkgs/top-level/all-packages.nix+1−1
pkgs/applications/misc/udiskie/default.nix+30−25
@@ -1,42 +1,47 @@
11{ lib
2+, asciidoc
23, fetchFromGitHub
3−, buildPythonApplication
4−, asciidoc-full
5−, docopt
6−, gettext
74, gobject-introspection
85, gtk3
9−, keyutils
6+, installShellFiles
107, libappindicator-gtk3
118, libnotify
129, librsvg
13−, nose
14−, pygobject3
15−, pyyaml
10+, python3
1611, udisks2
1712, wrapGAppsHook
1813}:
1914
20−buildPythonApplication rec {
15+python3.pkgs.buildPythonApplication rec {
2116 pname = "udiskie";
22− version = "2.4.0";
17+ version = "2.4.2";
18+
19+ format = "setuptools";
2320
2421 src = fetchFromGitHub {
2522 owner = "coldfix";
2623 repo = "udiskie";
2724 rev = "v${version}";
28− hash = "sha256-T4kMPMXfehZT7P+TOd1llR2TbHPA/quNL545xxlmJfE=";
25+ hash = "sha256-lQMJVSY3JeZYYOFDyV29Ye2j8r+ngE/ta2wQYipy4hU=";
2926 };
3027
31− outputs = [ "out" "man" ];
28+ patches = [
29+ ./locale-path.patch
30+ ];
31+
32+ postPatch = ''
33+ substituteInPlace udiskie/locale.py --subst-var out
34+ '';
3235
3336 nativeBuildInputs = [
34− asciidoc-full # Man page
35− gettext
37+ asciidoc # Man page
3638 gobject-introspection
39+ installShellFiles
3740 wrapGAppsHook
3841 ];
3942
43+ dontWrapGApps = true;
44+
4045 buildInputs = [
4146 gobject-introspection
4247 gtk3
@@ -46,8 +51,9 @@ buildPythonApplication rec {
4651 udisks2
4752 ];
4853
49− propagatedBuildInputs = [
54+ propagatedBuildInputs = with python3.pkgs; [
5055 docopt
56+ keyutils
5157 pygobject3
5258 pyyaml
5359 ];
@@ -57,21 +63,20 @@ buildPythonApplication rec {
5763 '';
5864
5965 postInstall = ''
60− mkdir -p $man/share/man/man8
61− cp -v doc/udiskie.8 $man/share/man/man8/
66+ installManPage doc/udiskie.8
6267 '';
6368
64− checkInputs = [
65− keyutils
66− nose
67− ];
68−
69− checkPhase = ''
70− nosetests
69+ preFixup = ''
70+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
7171 '';
7272
73+ checkInputs = with python3.pkgs; [
74+ pytestCheckHook
75+ ];
76+
7377 meta = with lib; {
7478 homepage = "https://github.com/coldfix/udiskie";
79+ changelog = "https://github.com/coldfix/udiskie/blob/${src.rev}/CHANGES.rst";
7580 description = "Removable disk automounter for udisks";
7681 longDescription = ''
7782 udiskie is a udisks2 front-end that allows to manage removeable media such
@@ -88,6 +93,6 @@ buildPythonApplication rec {
8893 - password caching (requires python keyutils 0.3)
8994 '';
9095 license = licenses.mit;
91− maintainers = with maintainers; [ AndersonTorres ];
96+ maintainers = with maintainers; [ AndersonTorres dotlambda ];
9297 };
9398}
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;
2935029350
2935129351 udevil = callPackage ../applications/misc/udevil {};
2935229352
29353− udiskie = python3.pkgs.callPackage ../applications/misc/udiskie { };
29353+ udiskie = callPackage ../applications/misc/udiskie { };
2935429354
2935529355 sacc = callPackage ../applications/networking/gopher/sacc { };
2935629356