Browse Source

z-lua: reveal bin name z to z.lua

According to document, user should call `eval "$(z.lua --init zsh)"` to initialize, it will create a _zlua() function and alias z to it, so there is no need to rename z.lua to z.
The formal bin name z.lua is better accordant with other distros.
nsd-state-dir
Monson Shao 2 years ago
committed by Mario Rodas
parent
commit
8f64caedbc
  1. 6
      pkgs/tools/misc/z-lua/default.nix

6
pkgs/tools/misc/z-lua/default.nix

@ -20,8 +20,10 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
install -Dm755 z.lua $out/bin/z
wrapProgram $out/bin/z --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so" --set _ZL_USE_LFS 1;
install -Dm755 z.lua $out/bin/z.lua
wrapProgram $out/bin/z.lua --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so" --set _ZL_USE_LFS 1;
# Create symlink for backwards compatibility. See: https://github.com/NixOS/nixpkgs/pull/96081
ln -s $out/bin/z.lua $out/bin/z
runHook postInstall
'';

Loading…
Cancel
Save