diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-07 15:09:31 +0300 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-01-07 17:48:50 +0100 |
commit | 1bdceb96281f9146585ac80a12de8cb9858179a8 (patch) | |
tree | 64f288947c8f48ec1bc5be5a85277c7801a93c58 /pkgs/tools/X11/xsecurelock | |
parent | 398051479349f912bc431f31b72195e80a41e077 (diff) | |
download | nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar.gz nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar.bz2 nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar.lz nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar.xz nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.tar.zst nixpkgs-1bdceb96281f9146585ac80a12de8cb9858179a8.zip |
xsecurelock: add coreutils to saver_blank script path
This script is used to delay something in a loop that is active while xscreensaver is running. Since it calls `sleep` from coreutils, the effect of `sleep` not being on $PATH is that it turns into a busy loop that does nothing, causing a variety of problems with things like resuming from suspend if a screenlocker is active. Situations where coreutils might not be on $PATH are, for example, cases where xscreensaver is launched via a systemd-unit (e.g. through xss-lock). I've been running xsecurelock with this change for a while (since https://cl.tvl.fyi/c/depot/+/4403) and it has resolved these issues for me.
Diffstat (limited to 'pkgs/tools/X11/xsecurelock')
-rw-r--r-- | pkgs/tools/X11/xsecurelock/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/tools/X11/xsecurelock/default.nix b/pkgs/tools/X11/xsecurelock/default.nix index 5c43dc6dff4..9539a717e61 100644 --- a/pkgs/tools/X11/xsecurelock/default.nix +++ b/pkgs/tools/X11/xsecurelock/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config , libX11, libXcomposite, libXft, libXmu, libXrandr, libXext, libXScrnSaver -, pam, apacheHttpd, pamtester, xscreensaver }: +, pam, apacheHttpd, pamtester, xscreensaver, coreutils, makeWrapper }: stdenv.mkDerivation rec { pname = "xsecurelock"; @@ -14,8 +14,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - autoreconfHook pkg-config + autoreconfHook pkg-config makeWrapper ]; + buildInputs = [ libX11 libXcomposite libXft libXmu libXrandr libXext libXScrnSaver pam apacheHttpd pamtester @@ -32,6 +33,10 @@ stdenv.mkDerivation rec { EOF ''; + postInstall = '' + wrapProgram $out/libexec/xsecurelock/saver_blank --prefix PATH : ${coreutils}/bin + ''; + meta = with lib; { description = "X11 screen lock utility with security in mind"; homepage = "https://github.com/google/xsecurelock"; |