Merge pull request #19470 from copumpkin/fix-sierra

Fix Darwin stdenv to work on Sierra
This commit is contained in:
Daniel Peebles
2016-10-12 19:04:03 -04:00
committed by GitHub
6 changed files with 246 additions and 279 deletions

View File

@@ -35,6 +35,18 @@ in stdenv.mkDerivation rec {
propagatedBuildInputs = [ ncurses zlib ];
# The goal here is to disable LLVM bindings (currently go and ocaml) regardless
# of whether the impure CMake search sheananigans find the compilers in global
# paths. This mostly exists because sandbox builds don't work very well on Darwin
# and sometimes you get weird behavior if CMake finds go in your system path.
# This would be far prettier if there were a CMake option to just disable bindings
# but from what I can tell, there isn't such a thing. The file in question only
# contains `if(WIN32)` conditions to check whether to disable bindings, so making
# those always succeed has the net effect of disabling all bindings.
prePatch = ''
substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
'';
# hacky fix: created binaries need to be run before installation
preBuild = ''
mkdir -p $out/