nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 nix-update-script,
7 meson,
8 ninja,
9 sassc,
10 vala,
11 pkg-config,
12 libgee,
13 gtk4,
14 glib,
15 gettext,
16 gsettings-desktop-schemas,
17 gobject-introspection,
18 wrapGAppsHook4,
19}:
20
21stdenv.mkDerivation rec {
22 pname = "granite";
23 version = "7.6.0";
24
25 outputs = [
26 "out"
27 "dev"
28 ];
29
30 src = fetchFromGitHub {
31 owner = "elementary";
32 repo = pname;
33 rev = version;
34 sha256 = "sha256-bv2rOq16xg9lCWfcLzAFN4LjBTJBxPhXvEJzutkdYzs=";
35 };
36
37 patches = [
38 # Init: Avoid crash with Gtk >= 4.17
39 # https://github.com/elementary/granite/pull/893
40 (fetchpatch {
41 url = "https://github.com/elementary/granite/commit/60cb8c4119b579592e6c7f3b1476e4d729f58699.patch";
42 hash = "sha256-6NB/Tu3mdmiBd77SOi4twdY/HidyhMn7mNN+54iFLIc=";
43 })
44 ];
45
46 nativeBuildInputs = [
47 gettext
48 gobject-introspection
49 meson
50 ninja
51 pkg-config
52 sassc
53 vala
54 wrapGAppsHook4
55 ];
56
57 propagatedBuildInputs = [
58 glib
59 gsettings-desktop-schemas # is_clock_format_12h uses "org.gnome.desktop.interface clock-format"
60 gtk4
61 libgee
62 ];
63
64 passthru = {
65 updateScript = nix-update-script { };
66 };
67
68 meta = with lib; {
69 description = "Extension to GTK used by elementary OS";
70 longDescription = ''
71 Granite is a companion library for GTK and GLib. Among other things, it provides complex widgets and convenience functions
72 designed for use in apps built for elementary OS.
73 '';
74 homepage = "https://github.com/elementary/granite";
75 license = licenses.lgpl3Plus;
76 platforms = platforms.linux;
77 teams = [ teams.pantheon ];
78 mainProgram = "granite-7-demo";
79 };
80}