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.
commit8f64caedbcce6291784296a58763cb1dc84a7553
authorMonson Shao <holymonson@gmail.com>
dateSun 23 Aug 2020, 16:54 (6 years ago)
parent08970e6
pkgs/tools/misc/z-lua/default.nix+4−2
@@ -20,8 +20,10 @@ stdenv.mkDerivation rec {
2020 installPhase = ''
2121 runHook preInstall
2222
23− install -Dm755 z.lua $out/bin/z
24− wrapProgram $out/bin/z --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so" --set _ZL_USE_LFS 1;
23+ install -Dm755 z.lua $out/bin/z.lua
24+ wrapProgram $out/bin/z.lua --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so" --set _ZL_USE_LFS 1;
25+ # Create symlink for backwards compatibility. See: https://github.com/NixOS/nixpkgs/pull/96081
26+ ln -s $out/bin/z.lua $out/bin/z
2527
2628 runHook postInstall
2729 '';