Merge pull request #37000 from knedlsepp/fix-glm-on-darwin

glm: fix darwin build
This commit is contained in:
Daiderd Jordan 2018-03-14 19:42:23 +01:00 committed by GitHub
commit 212d028331
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
# fetch newer version of platform.h which correctly supports gcc 7.3
gcc7PlatformPatch = fetchurl {
url = "https://raw.githubusercontent.com/g-truc/glm/dd48b56e44d699a022c69155c8672caacafd9e8a/glm/simd/platform.h";
sha256 = "0y91hlbgn5va7ijg5mz823gqkq9hqxl00lwmdwnf8q2g086rplzw";
url = "https://raw.githubusercontent.com/g-truc/glm/384dab02e45a8ad3c1a3fa0906e0d5682c5b27b9/glm/simd/platform.h";
sha256 = "0ym0sgwznxhfyi014xs55x3ql7r65fjs34sqb5jiaffkdhkqgzia";
};
postPatch = ''
@ -27,6 +27,10 @@ stdenv.mkDerivation rec {
cp ${gcc7PlatformPatch} glm/simd/platform.h
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [
"-DGLM_COMPILER=0"
];
postInstall = ''
mkdir -p $doc/share/doc/glm
cp -rv $NIX_BUILD_TOP/$sourceRoot/doc/* $doc/share/doc/glm