glew: Rely on cc-wrapper can to export these env vars

This commit is contained in:
John Ericson 2017-06-28 11:48:13 -04:00
parent 5c99b2f341
commit a40ceb2782
2 changed files with 12 additions and 16 deletions

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi { stdenv, fetchurl, mesa_glu, x11, libXmu, libXi
, AGL ? null }: , buildPlatform, hostPlatform
, AGL ? null
}:
with stdenv.lib; with stdenv.lib;
@ -36,13 +38,9 @@ stdenv.mkDerivation rec {
cp -r README.txt LICENSE.txt doc $out/share/doc/glew cp -r README.txt LICENSE.txt doc $out/share/doc/glew
''; '';
crossAttrs.makeFlags = [ makeFlags = if hostPlatform == buildPlatform then null else [
"CC=${stdenv.cross.config}-gcc" "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}"
"LD=${stdenv.cross.config}-gcc" ];
"AR=${stdenv.cross.config}-ar"
"STRIP="
] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw"
++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An OpenGL extension loading library for C(++)"; description = "An OpenGL extension loading library for C(++)";

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, mesa_glu, xlibsWrapper, libXmu, libXi }: { stdenv, fetchurl, mesa_glu, xlibsWrapper, libXmu, libXi
, buildPlatform, hostPlatform
}:
with stdenv.lib; with stdenv.lib;
@ -37,13 +39,9 @@ stdenv.mkDerivation rec {
rm $out/lib/*.a rm $out/lib/*.a
''; '';
crossAttrs.makeFlags = [ makeFlags = if hostPlatform == buildPlatform then null else [
"CC=${stdenv.cross.config}-gcc" "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}"
"LD=${stdenv.cross.config}-gcc" ];
"AR=${stdenv.cross.config}-ar"
"STRIP="
] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw"
++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An OpenGL extension loading library for C(++)"; description = "An OpenGL extension loading library for C(++)";