nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
Norbert Melzer 64b347a30a 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.
2023-05-13 20:28:52 +02:00

59 lines
1.3 KiB
Nix

{ fetchFromGitHub
, lib
, makeWrapper
, stdenv
# Dependencies (@see https://github.com/pavanjadhaw/betterlockscreen/blob/master/shell.nix)
, bc
, coreutils
, dbus
, withDunst ? true
, dunst
, i3lock-color
, gawk
, gnugrep
, gnused
, imagemagick
, procps
, 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";
src = fetchFromGitHub {
owner = "pavanjadhaw";
repo = "betterlockscreen";
rev = "v${version}";
sha256 = "sha256-ZZnwByxfESE8ZOOh1vnbphUHDolo9MIQh3erjtBLmWQ=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp betterlockscreen $out/bin/betterlockscreen
wrapProgram "$out/bin/betterlockscreen" \
--prefix PATH : "$out/bin:${lib.makeBinPath runtimeDeps}"
runHook postInstall
'';
meta = with lib; {
description = "Fast and sweet looking lockscreen for linux systems with effects!";
homepage = "https://github.com/pavanjadhaw/betterlockscreen";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ eyjhb sebtm ];
};
}