From 5d1e51a199917fa945cb59567597e354c6e4f56d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 26 Jun 2017 19:11:17 -0400 Subject: [PATCH] lua 5: Don't use stdenv.cross, and use less make flags cc-wrapper will define environment variables matching those now --- pkgs/development/interpreters/lua-5/5.2.nix | 12 ++++-------- pkgs/development/interpreters/lua-5/5.3.nix | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix index d14230c158e..3bd92186084 100644 --- a/pkgs/development/interpreters/lua-5/5.2.nix +++ b/pkgs/development/interpreters/lua-5/5.2.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, readline, compat ? false }: +{ stdenv, fetchurl, readline, compat ? false +, hostPlatform +}: let dsoPatch = fetchurl { @@ -55,21 +57,15 @@ stdenv.mkDerivation rec { ''; crossAttrs = let - isMingw = stdenv.cross.libc == "msvcrt"; - isDarwin = stdenv.cross.libc == "libSystem"; + inherit (hostPlatform) isDarwin isMingw; in { configurePhase = '' makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 - CC=${stdenv.cross.config}-gcc - STRIP=: - RANLIB=${stdenv.cross.config}-ranlib V=${luaversion} R=${version} ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' - AR="${stdenv.cross.config}-ar rcu" - macosx ''} ) '' + stdenv.lib.optionalString isMingw '' diff --git a/pkgs/development/interpreters/lua-5/5.3.nix b/pkgs/development/interpreters/lua-5/5.3.nix index a22e162b8e1..8290bd05c59 100644 --- a/pkgs/development/interpreters/lua-5/5.3.nix +++ b/pkgs/development/interpreters/lua-5/5.3.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, readline, compat ? false }: +{ stdenv, fetchurl, readline, compat ? false +, hostPlatform +}: stdenv.mkDerivation rec { name = "lua-${version}"; @@ -54,21 +56,15 @@ stdenv.mkDerivation rec { ''; crossAttrs = let - isMingw = stdenv.cross.libc == "msvcrt"; - isDarwin = stdenv.cross.libc == "libSystem"; + inherit (hostPlatform) isDarwin isMingw; in { configurePhase = '' makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 - CC=${stdenv.cross.config}-gcc - STRIP=: - RANLIB=${stdenv.cross.config}-ranlib V=${luaversion} R=${version} ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' - AR="${stdenv.cross.config}-ar rcu" - macosx ''} ) '' + stdenv.lib.optionalString isMingw ''