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

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

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