summary refs log tree commit diff
path: root/pkgs/top-level/lua-packages.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-02-07 20:08:55 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-02-07 20:12:38 +0000
commiteaba666273c285ec2d3702c8e627a9035683e268 (patch)
treef50a2dde3469534fb638e1255740df79570f9ab0 /pkgs/top-level/lua-packages.nix
parent3a526deaeeb7a83dae6e4a3c2a4cddcb776b3985 (diff)
downloadnixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar.gz
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar.bz2
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar.lz
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar.xz
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.tar.zst
nixpkgs-eaba666273c285ec2d3702c8e627a9035683e268.zip
luaPackages.luafilesystem: fix build on darwin
Diffstat (limited to 'pkgs/top-level/lua-packages.nix')
-rw-r--r--pkgs/top-level/lua-packages.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index badbeaafed9..a5490970b72 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -137,9 +137,16 @@ let
       url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
       sha256 = "134azkxw84xp9g5qmzjsmcva629jm7plwcmjxkdzdg05vyd7kig1";
     };
+    preConfigure = "substituteInPlace config --replace 'CC= gcc' '';"
+    + stdenv.lib.optionalString stdenv.isDarwin ''
+      substituteInPlace config \
+      --replace 'LIB_OPTION= -shared' '###' \
+      --replace '#LIB_OPTION= -bundle' 'LIB_OPTION= -bundle'
+      substituteInPlace Makefile --replace '10.3' '10.5'
+    '';
     meta = {
       homepage = "https://github.com/keplerproject/luafilesystem";
-      hydraPlatforms = stdenv.lib.platforms.linux;
+      hydraPlatforms = stdenv.lib.platforms.unix;
       maintainers = with maintainers; [ flosse ];
     };
   };