1{ lib, gitUpdater
2, fetchFromGitHub
3, meson
4, ninja
5, gettext
6, wrapGAppsHook
7, gobject-introspection
8, pango
9, gdk-pixbuf
10, python3
11, atk
12, gtk3
13}:
14
15python3.pkgs.buildPythonApplication rec {
16 pname = "diffuse";
17 version = "0.8.2";
18
19 src = fetchFromGitHub {
20 owner = "MightyCreak";
21 repo = "diffuse";
22 rev = "v${version}";
23 sha256 = "aGg5uh9KitVP2bBUizgGIZWvzTxfJGid0WUGVNyHdlk=";
24 };
25
26 format = "other";
27
28 nativeBuildInputs = [
29 wrapGAppsHook
30 meson
31 ninja
32 gettext
33 gobject-introspection
34 ];
35
36 buildInputs = [
37 pango
38 gdk-pixbuf
39 atk
40 gtk3
41 ];
42
43 propagatedBuildInputs = with python3.pkgs; [
44 pycairo
45 pygobject3
46 ];
47
48 preConfigure = ''
49 # app bundle for macos
50 substituteInPlace src/diffuse/meson.build data/icons/meson.build --replace "/Applications" "$out/Applications";
51 '';
52
53 mesonFlags = [
54 "-Db_ndebug=true"
55 ];
56
57 # to avoid running gtk-update-icon-cache, update-desktop-database and glib-compile-schemas
58 DESTDIR = "/";
59
60 passthru = {
61 updateScript = gitUpdater {
62 rev-prefix = "v";
63 };
64 };
65
66 meta = with lib; {
67 homepage = "https://github.com/MightyCreak/diffuse";
68 description = "Graphical tool for merging and comparing text files";
69 license = licenses.gpl2;
70 maintainers = with maintainers; [ k3a ];
71 platforms = platforms.unix;
72 };
73}