Skip to content

Commit

Permalink
glm: fix darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
knedlsepp committed Mar 14, 2018
1 parent ef90ff2 commit 863fb7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/development/libraries/glm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand All @@ -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
Expand Down

0 comments on commit 863fb7b

Please sign in to comment.