14 gobject-introspection,
20 dolphinIntegration ? false,
24 buildPythonPackage rec {
28 disabled = pythonOlder "3.5";
30 format = "setuptools";
32 src = fetchFromGitLab {
33 domain = "0xacab.org";
37 hash = "sha256-SuN62JjSb5O8gInvBH+elqv/Oe7j+xjCo+dmPBU7jEY=";
42 # hardcode paths to some binaries
46 exiftool = "${exiftool}/bin/exiftool";
47 ffmpeg = "${ffmpeg}/bin/ffmpeg";
49 // lib.optionalAttrs dolphinIntegration { kdialog = "${plasma5Packages.kdialog}/bin/kdialog"; }
51 # the executable shouldn't be called .mat2-wrapped
52 ./executable-name.patch
53 # hardcode path to mat2 executable
56 ++ lib.optionals (stdenv.hostPlatform.isLinux) [
58 src = ./bubblewrap-path.patch;
59 bwrap = "${bubblewrap}/bin/bwrap";
65 substituteInPlace dolphin/mat2.desktop \
66 --replace "@mat2@" "$out/bin/mat2" \
67 --replace "@mat2svg@" "$out/share/icons/hicolor/scalable/apps/mat2.svg"
81 propagatedBuildInputs = [
89 install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps"
90 install -Dm 444 doc/mat2.1 -t "$out/share/man/man1"
92 + lib.optionalString dolphinIntegration ''
93 install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus"
96 nativeCheckInputs = [ pytestCheckHook ];
99 # libmat2.pdf.cairo.MemoryError: out of memory
104 description = "Handy tool to trash your metadata";
105 homepage = "https://0xacab.org/jvoisin/mat2";
106 changelog = "https://0xacab.org/jvoisin/mat2/-/blob/${version}/CHANGELOG.md";
107 license = licenses.lgpl3Plus;
108 mainProgram = "mat2";
109 maintainers = with maintainers; [ dotlambda ];