btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / al / almanah / package.nix
blobf98a569fe6031b225847769df6c70acdd21f977a
1 { stdenv
2 , lib
3 , fetchurl
4 , fetchpatch
5 , atk
6 , cairo
7 , desktop-file-utils
8 , evolution-data-server-gtk4
9 , evolution
10 , gcr_4
11 , gettext
12 , glib
13 , gnome
14 , gpgme
15 , gtk3
16 , gtksourceview4
17 , gtkspell3
18 , libcryptui
19 , libxml2
20 , meson
21 , ninja
22 , pkg-config
23 , python3
24 , sqlite
25 , wrapGAppsHook3
28 stdenv.mkDerivation rec {
29   pname = "almanah";
30   version = "0.12.3";
32   src = fetchurl {
33     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
34     sha256 = "lMpDQOxlGljP66APR49aPbTZnfrGakbQ2ZcFvmiPMFo=";
35   };
37   patches = [
38     # Fix build with meson 0.61
39     # data/meson.build:2:5: ERROR: Function does not take positional arguments.
40     # Patch taken from https://gitlab.gnome.org/GNOME/almanah/-/merge_requests/13
41     (fetchpatch {
42       url = "https://gitlab.gnome.org/GNOME/almanah/-/commit/8c42a67695621d1e30cec933a04e633e6030bbaf.patch";
43       sha256 = "qyqFgYSu4emFDG/Mjwz1bZb3v3/4gwQSKmGCoPPNYCQ=";
44     })
46     # Port to Gcr 4
47     # https://gitlab.gnome.org/GNOME/almanah/-/merge_requests/14
48     (fetchpatch {
49       url = "https://gitlab.gnome.org/GNOME/almanah/-/commit/cd44b476f4ffbf37c5d5f5b996ecd711db925576.patch";
50       sha256 = "wJ1035NxgeTwUa0LoNcB6TSLxffoXBR3WbGAGkfggYY=";
51     })
53     # Port to GtkSourceView 4
54     # https://gitlab.gnome.org/GNOME/almanah/-/merge_requests/15
55     (fetchpatch {
56       url = "https://gitlab.gnome.org/GNOME/almanah/-/commit/0ba7f05cba7feaf2ae2c220596aead5dfc676675.patch";
57       sha256 = "5uvHTPzQloEq8SVt3EnZ+8mziBdXsDmu/e92/RtyFzE=";
58     })
59   ];
61   nativeBuildInputs = [
62     desktop-file-utils
63     gettext
64     libxml2
65     meson
66     ninja
67     pkg-config
68     python3
69     wrapGAppsHook3
70   ];
72   buildInputs = [
73     atk
74     cairo
75     evolution-data-server-gtk4
76     gcr_4
77     glib
78     evolution
79     gpgme
80     gtk3
81     gtksourceview4
82     gtkspell3
83     libcryptui
84     sqlite
85   ];
87   passthru = {
88     updateScript = gnome.updateScript {
89       packageName = pname;
90       versionPolicy = "none"; # it is quite odd
91     };
92   };
94   meta = with lib; {
95     description = "Small GTK application to allow to keep a diary of your life";
96     mainProgram = "almanah";
97     homepage = "https://gitlab.gnome.org/GNOME/almanah";
98     license = licenses.gpl3Plus;
99     platforms = platforms.unix;
100     maintainers = teams.gnome.members;
101   };