diff options
author | 8573 <8573@users.noreply.github.com> | 2016-08-14 11:38:25 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-08-14 11:38:25 +0000 |
commit | 14120a423b974dc5c7672e6b38d2f24c7163749d (patch) | |
tree | 0c17ea38d51ac4a1ede8e627303810b42a372783 /pkgs/applications/misc/dmenu/default.nix | |
parent | 6172662676cb10b37ea2a57d2b04bc0599e546dd (diff) |
dmenu: Fix scripts to run commands by store paths (#17709)
The `dmenu` package includes two binary programs, `dmenu` and `stest`, and two shell scripts, `dmenu_run` and `dmenu_path`. `dmenu_run` invokes `dmenu` and `dmenu_path`, and `dmenu_path` invokes `stest`. `dmenu_run`'s invocation of `dmenu` was patched to run it by its full store path, but its invocation of `dmenu_path` and `dmenu_path`'s invocation of `stest` were not. If `dmenu_path` and `stest` were not in the set of system packages or otherwise in the `PATH`, this situation would result in `dmenu_run` opening a dmenu instance with no menu entries (which would normally be generated by `dmenu_path`, which `dmenu_run` couldn't find, as it was running it by `PATH` lookup). This commit fixes the package to also patch the invocation of `dmenu_path` in `dmenu_run` and the invocations of `stest` in `dmenu_path` to invoke those programs by their full store paths. I have tested this change on NixOS.
Diffstat (limited to 'pkgs/applications/misc/dmenu/default.nix')
-rw-r--r-- | pkgs/applications/misc/dmenu/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/applications/misc/dmenu/default.nix b/pkgs/applications/misc/dmenu/default.nix index b0879599833b6..1dc9fe5e2026e 100644 --- a/pkgs/applications/misc/dmenu/default.nix +++ b/pkgs/applications/misc/dmenu/default.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation rec { inherit patches; postPatch = '' - sed -ri -e 's!\<(dmenu|stest)\>!'"$out/bin"'/&!g' dmenu_run + sed -ri -e 's!\<(dmenu|dmenu_path|stest)\>!'"$out/bin"'/&!g' dmenu_run + sed -ri -e 's!\<stest\>!'"$out/bin"'/&!g' dmenu_path ''; preConfigure = '' |