1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 fetchpatch,
6 desktop-file-utils,
7 gettext,
8 libxml2,
9 meson,
10 ninja,
11 pkg-config,
12 vala,
13 wayland-scanner,
14 wrapGAppsHook3,
15 at-spi2-core,
16 gnome-settings-daemon,
17 gnome-desktop,
18 granite,
19 granite7,
20 gtk3,
21 gtk4,
22 libcanberra,
23 libgee,
24 libhandy,
25 mutter,
26 sqlite,
27 systemd,
28 nix-update-script,
29}:
30
31stdenv.mkDerivation rec {
32 pname = "gala";
33 version = "8.2.5";
34
35 src = fetchFromGitHub {
36 owner = "elementary";
37 repo = pname;
38 rev = version;
39 hash = "sha256-uupFeQ73hr6ziLEtzgVJWASUxhspXJX54/U+3PLSCFY=";
40 };
41
42 patches = [
43 # We look for plugins in `/run/current-system/sw/lib/` because
44 # there are multiple plugin providers (e.g. gala and wingpanel).
45 ./plugins-dir.patch
46
47 # Fix gtk3 daemon menu location with x2 scaling
48 # https://github.com/elementary/gala/pull/2493
49 (fetchpatch {
50 url = "https://github.com/elementary/gala/commit/33bc3ebe7f175c61845feaf2d06083f1e3b64ddc.patch";
51 hash = "sha256-hjjiKcO5o/OABKD8vUsVyqtNKN4ffEOGZntLceLr2+k=";
52 })
53 ];
54
55 depsBuildBuild = [ pkg-config ];
56
57 nativeBuildInputs = [
58 desktop-file-utils
59 gettext
60 libxml2
61 meson
62 ninja
63 pkg-config
64 vala
65 wayland-scanner
66 wrapGAppsHook3
67 ];
68
69 buildInputs = [
70 at-spi2-core
71 gnome-settings-daemon
72 gnome-desktop
73 granite
74 granite7
75 gtk3
76 gtk4 # gala-daemon
77 libcanberra
78 libgee
79 libhandy
80 mutter
81 sqlite
82 systemd
83 ];
84
85 passthru = {
86 updateScript = nix-update-script { };
87 };
88
89 meta = with lib; {
90 description = "Window & compositing manager based on mutter and designed by elementary for use with Pantheon";
91 homepage = "https://github.com/elementary/gala";
92 license = licenses.gpl3Plus;
93 platforms = platforms.linux;
94 teams = [ teams.pantheon ];
95 mainProgram = "gala";
96 };
97}