forked from mirrors/nixpkgs
z-lua: wrap LUA_CPATH manually instead of lua.withPackages
We can't use lua.withPackages, because on darwin shebangs can't point to interpreted (shebang'd) scripts. See https://github.com/NixOS/nixpkgs/issues/23018
This commit is contained in:
parent
b16a186529
commit
0f1ce1787f
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, lua }:
|
||||
{ stdenv, fetchFromGitHub, lua52Packages, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "z-lua";
|
||||
|
@ -13,10 +13,17 @@ stdenv.mkDerivation rec {
|
|||
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ (lua.withPackages (p: with p; [ luafilesystem ])) ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ lua52Packages.lua ];
|
||||
|
||||
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;
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue