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=";
41 # hardcode paths to some binaries
44 exiftool = "${exiftool}/bin/exiftool";
45 ffmpeg = "${ffmpeg}/bin/ffmpeg";
46 } // lib.optionalAttrs dolphinIntegration {
47 kdialog = "${plasma5Packages.kdialog}/bin/kdialog";
49 # the executable shouldn't be called .mat2-wrapped
50 ./executable-name.patch
51 # hardcode path to mat2 executable
53 ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [
55 src = ./bubblewrap-path.patch;
56 bwrap = "${bubblewrap}/bin/bwrap";
62 substituteInPlace dolphin/mat2.desktop \
63 --replace "@mat2@" "$out/bin/mat2" \
64 --replace "@mat2svg@" "$out/share/icons/hicolor/scalable/apps/mat2.svg"
78 propagatedBuildInputs = [
85 install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps"
86 install -Dm 444 doc/mat2.1 -t "$out/share/man/man1"
87 '' + lib.optionalString dolphinIntegration ''
88 install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus"
91 nativeCheckInputs = [ pytestCheckHook ];
94 # Frequently fails when exiftool is updated and adds support for new metadata.
99 description = "A handy tool to trash your metadata";
100 homepage = "https://0xacab.org/jvoisin/mat2";
101 changelog = "https://0xacab.org/jvoisin/mat2/-/blob/${version}/CHANGELOG.md";
102 license = licenses.lgpl3Plus;
103 mainProgram = "mat2";
104 maintainers = with maintainers; [ dotlambda ];