forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / ci / cinnamon-session / package.nix
blob790e0cfe6efcb3162de3667d3dbc911e38f40214
1 { fetchFromGitHub
2 , cinnamon-desktop
3 , cinnamon-settings-daemon
4 , cinnamon-translations
5 , dbus-glib
6 , glib
7 , gsettings-desktop-schemas
8 , gtk3
9 , libcanberra
10 , libxslt
11 , meson
12 , ninja
13 , pkg-config
14 , python3
15 , lib
16 , stdenv
17 , systemd
18 , wrapGAppsHook3
19 , xapp
20 , xorg
21 , libexecinfo
22 , pango
25 let
26   pythonEnv = python3.withPackages (pp: with pp; [
27     python-xapp
28     pygobject3
29     setproctitle
30   ]);
32 stdenv.mkDerivation rec {
33   pname = "cinnamon-session";
34   version = "6.2.1";
36   src = fetchFromGitHub {
37     owner = "linuxmint";
38     repo = pname;
39     rev = version;
40     hash = "sha256-mr+QOFogzoloasGt1uK6zH/KHuH+uWYzXAZxPYkW57A=";
41   };
43   patches = [
44     ./0001-Use-dbus_glib-instead-of-elogind.patch
45   ];
47   buildInputs = [
48     # meson.build
49     cinnamon-desktop
50     gtk3
51     glib
52     libcanberra
53     pango
54     xorg.libX11
55     xorg.libXext
56     xapp
57     xorg.libXau
58     xorg.libXcomposite
60     systemd
62     xorg.libXtst
63     xorg.libXrender
64     xorg.xtrans
66     # other (not meson.build)
67     cinnamon-settings-daemon
68     dbus-glib
69     glib
70     gsettings-desktop-schemas
71     pythonEnv # for cinnamon-session-quit
72   ];
74   nativeBuildInputs = [
75     meson
76     ninja
77     wrapGAppsHook3
78     libexecinfo
79     python3
80     pkg-config
81     libxslt
82   ];
84   mesonFlags = [
85     # use locales from cinnamon-translations
86     "--localedir=${cinnamon-translations}/share/locale"
87   ];
89   postPatch = ''
90     # patchShebangs requires executable file
91     chmod +x data/meson_install_schemas.py cinnamon-session-quit/cinnamon-session-quit.py
92     patchShebangs --build data/meson_install_schemas.py
93     patchShebangs --host cinnamon-session-quit/cinnamon-session-quit.py
94   '';
96   preFixup = ''
97     gappsWrapperArgs+=(
98       --prefix XDG_DATA_DIRS : "${cinnamon-desktop}/share"
99       --prefix XDG_CONFIG_DIRS : "${cinnamon-settings-daemon}/etc/xdg"
100     )
101   '';
103   meta = with lib; {
104     homepage = "https://github.com/linuxmint/cinnamon-session";
105     description = "Cinnamon session manager";
106     license = licenses.gpl2;
107     platforms = platforms.linux;
108     maintainers = teams.cinnamon.members;
109   };