aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/X11
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-10-14 11:32:49 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-10-14 11:32:49 +0200
commitb981eca0574092024b0ab76a5e3c1932d6381a94 (patch)
treeef5b7926397df1765b59ef5af047b91eb2675e91 /pkgs/tools/X11
parent9e1943edc03c14854295d47001c2b46d7d2472de (diff)
parentffde8a8e1ed76caa1d213c3209dee7f75b57a20d (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r--pkgs/tools/X11/caffeine-ng/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/tools/X11/caffeine-ng/default.nix b/pkgs/tools/X11/caffeine-ng/default.nix
index c161a7c77378..4f709ee9db08 100644
--- a/pkgs/tools/X11/caffeine-ng/default.nix
+++ b/pkgs/tools/X11/caffeine-ng/default.nix
@@ -1,5 +1,5 @@
{ gdk-pixbuf, glib, gobject-introspection, gtk3, lib, libnotify,
- python3Packages, wrapGAppsHook
+ procps, xset, xautolock, xscreensaver, python3Packages, wrapGAppsHook
}:
python3Packages.buildPythonApplication rec {
@@ -12,17 +12,25 @@ python3Packages.buildPythonApplication rec {
};
nativeBuildInputs = [ wrapGAppsHook glib ];
- buildInputs = [
- gdk-pixbuf gobject-introspection libnotify gtk3
+ buildInputs = [
+ gdk-pixbuf gobject-introspection libnotify gtk3
python3Packages.setuptools_scm
];
pythonPath = with python3Packages; [
dbus-python docopt ewmh pygobject3 pyxdg
- setproctitle
+ setproctitle
];
doCheck = false; # There are no tests.
+ postPatch = ''
+ substituteInPlace caffeine/inhibitors.py \
+ --replace 'os.system("xset' 'os.system("${xset}/bin/xset' \
+ --replace 'os.system("xautolock' 'os.system("${xautolock}/bin/xautolock' \
+ --replace 'os.system("pgrep' 'os.system("${procps}/bin/pgrep' \
+ --replace 'os.system("xscreensaver-command' 'os.system("${xscreensaver}/bin/xscreensaver-command'
+ '';
+
postInstall = ''
mkdir -p $out/share
cp -r share $out/