From 8f64caedbcce6291784296a58763cb1dc84a7553 Mon Sep 17 00:00:00 2001 From: Monson Shao Date: Sun, 23 Aug 2020 16:54:30 +0800 Subject: [PATCH] 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. --- pkgs/tools/misc/z-lua/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/z-lua/default.nix b/pkgs/tools/misc/z-lua/default.nix index 59149506e6c..dc689236867 100644 --- a/pkgs/tools/misc/z-lua/default.nix +++ b/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 '';