From 64b347a30a7f82d9746bf95a34a648360c1199f4 Mon Sep 17 00:00:00 2001 From: Norbert Melzer Date: Sat, 13 May 2023 20:28:52 +0200 Subject: 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. --- pkgs/misc/screensavers/betterlockscreen/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/screensavers/betterlockscreen/default.nix b/pkgs/misc/screensavers/betterlockscreen/default.nix index f53cb5a97760..8c7740ae7bb5 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 ''; -- cgit v1.2.3