about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/i3/lock-fancy.nix
diff options
context:
space:
mode:
authorRail Aliiev <rail@mozilla.com>2016-08-06 21:42:43 -0400
committerRok Garbas <rok@garbas.si>2016-08-07 03:42:43 +0200
commitd6d4cf185ed7c6cfad369d694e844b3a5e98371f (patch)
tree57612fd6f8b894f457c7dc2de46affe97734958b /pkgs/applications/window-managers/i3/lock-fancy.nix
parent8dc53d76d5dca09bf3ace15af7dbb32daba0fc9f (diff)
i3lock-fancy: use absolute paths (#17569)
When it's used from command line or as a i3 shortcut, i3lock-fancy works
without any issues. If you try to pass it as an argument to xss-lock or
xautolock running as a systemd user service, getopt and fc-match are not in
PATH and locking doesn't work as expected. This patch replaces non absolute
paths with stable ones and should fix the issue.
Diffstat (limited to 'pkgs/applications/window-managers/i3/lock-fancy.nix')
-rw-r--r--pkgs/applications/window-managers/i3/lock-fancy.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/applications/window-managers/i3/lock-fancy.nix b/pkgs/applications/window-managers/i3/lock-fancy.nix
index dd7f89b2a8ded..378001528b1f4 100644
--- a/pkgs/applications/window-managers/i3/lock-fancy.nix
+++ b/pkgs/applications/window-managers/i3/lock-fancy.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk
-, i3lock-color
+, i3lock-color, getopt, fontconfig
 }:
 
 stdenv.mkDerivation rec {
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
     sed -i -e "s|i3lock -n |${i3lock-color}/bin/i3lock-color -n |" lock
     sed -i -e 's|ICON="$SCRIPTPATH/lockdark.png"|ICON="'$out'/share/i3lock-fancy/lockdark.png"|' lock
     sed -i -e 's|ICON="$SCRIPTPATH/lock.png"|ICON="'$out'/share/i3lock-fancy/lock.png"|' lock
+    sed -i -e "s|getopt |${getopt}/bin/getopt |" lock
+    sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" lock
   '';
   installPhase = ''
     mkdir -p $out/bin $out/share/i3lock-fancy