glm: fix darwin build

This commit is contained in:
Josef Kemetmüller 2018-03-14 18:06:21 +00:00
parent ef90ff2d8e
commit 863fb7b86a

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