1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, meson
, ninja
, glib
, dbus
, gettext
, cinnamon-desktop
, cinnamon-common
, intltool
, libxslt
, gtk3
, libgnomekbd
, caribou
, libtool
, wrapGAppsHook3
, gobject-introspection
, python3
, pam
, cairo
, xapp
, xdotool
, xorg
, iso-flags-png-320x240
}:
stdenv.mkDerivation rec {
pname = "cinnamon-screensaver";
version = "6.2.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = version;
hash = "sha256-f1Z3fmtCokWNLJwsTOAIAZB3lwFfqakJJco3umyEaYk=";
};
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
gettext
intltool
dbus # for meson.build
libxslt
libtool
meson
ninja
gobject-introspection
];
buildInputs = [
# from meson.build
gtk3
glib
xorg.libXext
xorg.libXinerama
xorg.libX11
xorg.libXrandr
(python3.withPackages (pp: with pp; [
pygobject3
setproctitle
python-xapp
pycairo
]))
xapp
xdotool
pam
cairo
cinnamon-desktop
cinnamon-common
libgnomekbd
caribou
];
postPatch = ''
# cscreensaver hardcodes absolute paths everywhere. Nuke from orbit.
find . -type f -exec sed -i \
-e s,/usr/share/locale,/run/current-system/sw/share/locale,g \
-e s,/usr/lib/cinnamon-screensaver,$out/lib,g \
-e s,/usr/share/cinnamon-screensaver,$out/share,g \
-e s,/usr/share/iso-flag-png,${iso-flags-png-320x240}/share/iso-flags-png,g \
{} +
'';
preFixup = ''
# https://github.com/NixOS/nixpkgs/issues/101881
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${caribou}/share"
)
'';
meta = with lib; {
homepage = "https://github.com/linuxmint/cinnamon-screensaver";
description = "Cinnamon screen locker and screensaver program";
license = [ licenses.gpl2 licenses.lgpl2 ];
platforms = platforms.linux;
maintainers = teams.cinnamon.members;
};
}
|