diff options
Diffstat (limited to 'pkgs/development/python-modules/mat2/default.nix')
-rw-r--r-- | pkgs/development/python-modules/mat2/default.nix | 100 |
1 files changed, 53 insertions, 47 deletions
diff --git a/pkgs/development/python-modules/mat2/default.nix b/pkgs/development/python-modules/mat2/default.nix index 1646d3ac72460..c9229f2f49f7b 100644 --- a/pkgs/development/python-modules/mat2/default.nix +++ b/pkgs/development/python-modules/mat2/default.nix @@ -1,24 +1,25 @@ -{ lib -, stdenv -, buildPythonPackage -, pytestCheckHook -, pythonOlder -, fetchFromGitLab -, substituteAll -, bubblewrap -, exiftool -, ffmpeg -, mailcap -, wrapGAppsHook -, gdk-pixbuf -, gobject-introspection -, librsvg -, poppler_gi -, mutagen -, pygobject3 -, pycairo -, dolphinIntegration ? false -, plasma5Packages +{ + lib, + stdenv, + buildPythonPackage, + pytestCheckHook, + pythonOlder, + fetchFromGitLab, + substituteAll, + bubblewrap, + exiftool, + ffmpeg, + mailcap, + wrapGAppsHook3, + gdk-pixbuf, + gobject-introspection, + librsvg, + poppler_gi, + mutagen, + pygobject3, + pycairo, + dolphinIntegration ? false, + plasma5Packages, }: buildPythonPackage rec { @@ -37,25 +38,28 @@ buildPythonPackage rec { hash = "sha256-SuN62JjSb5O8gInvBH+elqv/Oe7j+xjCo+dmPBU7jEY="; }; - patches = [ - # hardcode paths to some binaries - (substituteAll ({ - src = ./paths.patch; - exiftool = "${exiftool}/bin/exiftool"; - ffmpeg = "${ffmpeg}/bin/ffmpeg"; - } // lib.optionalAttrs dolphinIntegration { - kdialog = "${plasma5Packages.kdialog}/bin/kdialog"; - })) - # the executable shouldn't be called .mat2-wrapped - ./executable-name.patch - # hardcode path to mat2 executable - ./tests.patch - ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [ - (substituteAll { - src = ./bubblewrap-path.patch; - bwrap = "${bubblewrap}/bin/bwrap"; - }) - ]; + patches = + [ + # hardcode paths to some binaries + (substituteAll ( + { + src = ./paths.patch; + exiftool = "${exiftool}/bin/exiftool"; + ffmpeg = "${ffmpeg}/bin/ffmpeg"; + } + // lib.optionalAttrs dolphinIntegration { kdialog = "${plasma5Packages.kdialog}/bin/kdialog"; } + )) + # the executable shouldn't be called .mat2-wrapped + ./executable-name.patch + # hardcode path to mat2 executable + ./tests.patch + ] + ++ lib.optionals (stdenv.hostPlatform.isLinux) [ + (substituteAll { + src = ./bubblewrap-path.patch; + bwrap = "${bubblewrap}/bin/bwrap"; + }) + ]; postPatch = '' rm pyproject.toml @@ -66,7 +70,7 @@ buildPythonPackage rec { nativeBuildInputs = [ gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ @@ -81,12 +85,14 @@ buildPythonPackage rec { pycairo ]; - postInstall = '' - install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps" - install -Dm 444 doc/mat2.1 -t "$out/share/man/man1" - '' + lib.optionalString dolphinIntegration '' - install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus" - ''; + postInstall = + '' + install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps" + install -Dm 444 doc/mat2.1 -t "$out/share/man/man1" + '' + + lib.optionalString dolphinIntegration '' + install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus" + ''; nativeCheckInputs = [ pytestCheckHook ]; |