Skip to content

Commit

Permalink
Merge pull request #69635 from marsam/fix-z-lua-darwin
Browse files Browse the repository at this point in the history
z-lua: fix build on darwin
  • Loading branch information
marsam authored Sep 27, 2019
2 parents afd6b04 + 0f1ce17 commit 9c1eb7a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkgs/tools/misc/z-lua/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, lua }:
{ stdenv, fetchFromGitHub, lua52Packages, makeWrapper }:

stdenv.mkDerivation rec {
pname = "z-lua";
Expand All @@ -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; {
Expand Down

0 comments on commit 9c1eb7a

Please sign in to comment.