about summary refs log tree commit diff
path: root/pkgs/misc/screensavers
diff options
context:
space:
mode:
authorNorbert Melzer <timmelzer@gmail.com>2023-05-13 20:28:52 +0200
committerNorbert Melzer <timmelzer@gmail.com>2023-05-13 20:28:52 +0200
commit64b347a30a7f82d9746bf95a34a648360c1199f4 (patch)
treefacb896a67eb47ac8221d293cc057c8a2fb305ca /pkgs/misc/screensavers
parent790a208ab942ea6ae537b5d008c800d352af22c5 (diff)
betterlockscreen: make dunst optional
When dunst is detected *and* awesomeWM is used (its internal notification system to be exact)
then betterlockscreen waits for dunst to reply on the DBus. Due to dunstctl being in PATH
through the wrapper, dunst will always be tried to reach.

None of the workarounds mentioned in the awesome and betterlockscreen repos do not work with
this version, as dunstctl is always called and has to time out first.

In the current master of BLS there is a change that makes BLS check and env-var first, and
would ignore any dunstctl in PATH.

Once the new release happened this could still be used to reduce the closure size.
Diffstat (limited to 'pkgs/misc/screensavers')
-rw-r--r--pkgs/misc/screensavers/betterlockscreen/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/misc/screensavers/betterlockscreen/default.nix b/pkgs/misc/screensavers/betterlockscreen/default.nix
index f53cb5a977600..8c7740ae7bb55 100644
--- a/pkgs/misc/screensavers/betterlockscreen/default.nix
+++ b/pkgs/misc/screensavers/betterlockscreen/default.nix
@@ -7,6 +7,7 @@
 , bc
 , coreutils
 , dbus
+, withDunst ? true
 , dunst
 , i3lock-color
 , gawk
@@ -17,6 +18,12 @@
 , xorg
 }:
 
+let
+  runtimeDeps =
+    [ bc coreutils dbus i3lock-color gawk gnugrep gnused imagemagick procps xorg.xdpyinfo xorg.xrandr xorg.xset ]
+    ++ lib.optionals withDunst [ dunst ];
+in
+
 stdenv.mkDerivation rec {
   pname = "betterlockscreen";
   version = "4.0.4";
@@ -36,7 +43,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin
     cp betterlockscreen $out/bin/betterlockscreen
     wrapProgram "$out/bin/betterlockscreen" \
-      --prefix PATH : "$out/bin:${lib.makeBinPath [ bc coreutils dbus dunst i3lock-color gawk gnugrep gnused imagemagick procps xorg.xdpyinfo xorg.xrandr xorg.xset ]}"
+      --prefix PATH : "$out/bin:${lib.makeBinPath runtimeDeps}"
 
     runHook postInstall
   '';