15 , gobject-introspection
21 , dolphinIntegration ? false
25 buildPythonPackage rec {
29 disabled = pythonOlder "3.5";
31 src = fetchFromGitLab {
32 domain = "0xacab.org";
36 hash = "sha256-H3l8w2F+ZcJ1P/Dg0ZVBJPUK0itLocL7a0jeSrG3Ws8=";
40 # hardcode paths to some binaries
43 exiftool = "${exiftool}/bin/exiftool";
44 ffmpeg = "${ffmpeg}/bin/ffmpeg";
45 } // lib.optionalAttrs dolphinIntegration {
46 kdialog = "${plasma5Packages.kdialog}/bin/kdialog";
48 # the executable shouldn't be called .mat2-wrapped
49 ./executable-name.patch
50 # hardcode path to mat2 executable
52 # fix gobject-introspection typelib path for Nautilus extension
54 src = ./fix_poppler.patch;
55 poppler_path = "${poppler_gi}/lib/girepository-1.0";
57 # https://0xacab.org/jvoisin/mat2/-/issues/178
59 url = "https://0xacab.org/jvoisin/mat2/-/commit/618e0a8e3984fd534b95ef3dbdcb8a76502c90b5.patch";
60 hash = "sha256-l9UFim3hGj+d2uKITiDG1OnqGeo2McBIiRSmK0Vidg8=";
62 ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [
64 src = ./bubblewrap-path.patch;
65 bwrap = "${bubblewrap}/bin/bwrap";
70 substituteInPlace dolphin/mat2.desktop \
71 --replace "@mat2@" "$out/bin/mat2" \
72 --replace "@mat2svg@" "$out/share/icons/hicolor/scalable/apps/mat2.svg"
86 propagatedBuildInputs = [
93 install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps"
94 install -Dm 444 doc/mat2.1 -t "$out/share/man/man1"
95 install -Dm 444 nautilus/mat2.py -t "$out/share/nautilus-python/extensions"
96 buildPythonPath "$out $pythonPath $propagatedBuildInputs"
97 patchPythonScript "$out/share/nautilus-python/extensions/mat2.py"
98 '' + lib.optionalString dolphinIntegration ''
99 install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus"
102 checkInputs = [ unittestCheckHook ];
104 unittestFlagsArray = [ "-v" ];
107 description = "A handy tool to trash your metadata";
108 homepage = "https://0xacab.org/jvoisin/mat2";
109 changelog = "https://0xacab.org/jvoisin/mat2/-/blob/${version}/CHANGELOG.md";
110 license = licenses.lgpl3Plus;
111 maintainers = with maintainers; [ dotlambda ];