3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #69635 from marsam/fix-z-lua-darwin

z-lua: fix build on darwin
This commit is contained in:
Mario Rodas 2019-09-27 03:18:22 -05:00 committed by GitHub
commit 9c1eb7ae68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {