1 { lib, stdenv, fetchFromGitHub, lua52Packages, makeWrapper }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-q4hJ6QAR8cXjXM2e5Et1/DzyEw9L0120sgpTtqGG5wQ=";
16 nativeBuildInputs = [ makeWrapper ];
18 buildInputs = [ lua52Packages.lua ];
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
32 homepage = "https://github.com/skywind3000/z.lua";
33 description = "A new cd command that helps you navigate faster by learning your habits";
34 license = licenses.mit;
35 maintainers = [ maintainers.marsam ];