Merge pull request #178731 from shlevy/isabelle-darwin

Fix isabelle on darwin

authored by

Shea Levy and committed by
GitHub
e9e3a5af d76bc927

+28 -11
+12 -4
pkgs/applications/science/logic/isabelle/default.nix
··· 47 sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i"; 48 }; 49 50 - buildInputs = [ polyml z3 veriT vampire eprover-ho ] 51 - ++ lib.optionals (!stdenv.isDarwin) [ nettools java ]; 52 53 - sourceRoot = dirname; 54 55 postPatch = '' 56 patchShebangs . ··· 112 --replace '"$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so")' '"${sha1}/lib/libsha1.so"' 113 114 rm -r heaps 115 '' + (if ! stdenv.isLinux then "" else '' 116 arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} 117 for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do ··· 180 homepage = "https://isabelle.in.tum.de/"; 181 license = licenses.bsd3; 182 maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ]; 183 - platforms = platforms.linux; 184 }; 185 } // { 186 withComponents = f:
··· 47 sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i"; 48 }; 49 50 + buildInputs = [ polyml z3 veriT vampire eprover-ho nettools ] 51 + ++ lib.optionals (!stdenv.isDarwin) [ java ]; 52 53 + sourceRoot = "${dirname}${lib.optionalString stdenv.isDarwin ".app"}"; 54 + 55 + postUnpack = if stdenv.isDarwin then '' 56 + mv $sourceRoot ${dirname} 57 + sourceRoot=${dirname} 58 + '' else null; 59 60 postPatch = '' 61 patchShebangs . ··· 117 --replace '"$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so")' '"${sha1}/lib/libsha1.so"' 118 119 rm -r heaps 120 + '' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") '' 121 + substituteInPlace lib/scripts/isabelle-platform \ 122 + --replace 'ISABELLE_APPLE_PLATFORM64=arm64-darwin' "" 123 '' + (if ! stdenv.isLinux then "" else '' 124 arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} 125 for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do ··· 188 homepage = "https://isabelle.in.tum.de/"; 189 license = licenses.bsd3; 190 maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ]; 191 + platforms = platforms.unix; 192 }; 193 } // { 194 withComponents = f:
+2
pkgs/applications/science/logic/z3/4.4.0.nix
··· 14 buildInputs = [ python ]; 15 enableParallelBuilding = true; 16 17 configurePhase = "python scripts/mk_make.py --prefix=$out && cd build"; 18 19 # z3's install phase is stupid because it tries to calculate the
··· 14 buildInputs = [ python ]; 15 enableParallelBuilding = true; 16 17 + CXXFLAGS = if stdenv.isDarwin then "-std=gnu++98" else null; 18 + 19 configurePhase = "python scripts/mk_make.py --prefix=$out && cd build"; 20 21 # z3's install phase is stupid because it tries to calculate the
+4 -2
pkgs/development/compilers/gcc/4.9/default.nix
··· 154 155 hardeningDisable = [ "format" "pie" ]; 156 157 - outputs = if langJava || langGo then ["out" "man" "info"] 158 else [ "out" "lib" "man" "info" ]; 159 setOutputFlags = false; 160 NIX_NO_SELF_RPATH = true; ··· 328 maintainers = with lib.maintainers; [ veprbl ]; 329 330 platforms = lib.platforms.unix; 331 - badPlatforms = lib.platforms.darwin; 332 }; 333 } 334
··· 154 155 hardeningDisable = [ "format" "pie" ]; 156 157 + # When targetting darwin, libgcc_ext.10.{4,5}.dylib are created as 158 + # MH_DYLIB_STUB files, which install_name_tool can't change, so we 159 + # get a cycle between $out and $lib. 160 + outputs = if langJava || langGo || targetPlatform.isDarwin then ["out" "man" "info"] 161 else [ "out" "lib" "man" "info" ]; 162 setOutputFlags = false; 163 NIX_NO_SELF_RPATH = true; ··· 331 maintainers = with lib.maintainers; [ veprbl ]; 332 333 platforms = lib.platforms.unix; 334 }; 335 } 336
+6 -4
pkgs/development/compilers/gcc/common/pre-configure.nix
··· 6 , langGo }: 7 8 assert langJava -> lib.versionOlder version "7"; 9 - assert langAda -> gnatboot != null; 10 - 11 - lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' 12 export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` 13 export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" 14 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 15 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 16 - '' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) '' 17 export lib=$out; 18 '' + lib.optionalString langAda '' 19 export PATH=${gnatboot}/bin:$PATH
··· 6 , langGo }: 7 8 assert langJava -> lib.versionOlder version "7"; 9 + assert langAda -> gnatboot != null; let 10 + needsLib 11 + = (lib.versionOlder version "7" && (langJava || langGo)) 12 + || (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin); 13 + in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' 14 export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` 15 export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" 16 export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" 17 export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" 18 + '' + lib.optionalString needsLib '' 19 export lib=$out; 20 '' + lib.optionalString langAda '' 21 export PATH=${gnatboot}/bin:$PATH
+4 -1
pkgs/top-level/all-packages.nix
··· 12812 isl = if !stdenv.isDarwin then isl_0_11 else null; 12813 12814 cloog = if !stdenv.isDarwin then cloog_0_18_0 else null; 12815 })); 12816 12817 gcc6 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/6 { ··· 33626 z3 = z3_4_8; 33627 z3_4_4_0 = callPackage ../applications/science/logic/z3/4.4.0.nix { 33628 python = python2; 33629 - stdenv = gcc49Stdenv; 33630 }; 33631 z3-tptp = callPackage ../applications/science/logic/z3/tptp.nix {}; 33632
··· 12812 isl = if !stdenv.isDarwin then isl_0_11 else null; 12813 12814 cloog = if !stdenv.isDarwin then cloog_0_18_0 else null; 12815 + 12816 + # Build fails on Darwin with clang 12817 + stdenv = if stdenv.isDarwin then gccStdenv else stdenv; 12818 })); 12819 12820 gcc6 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/6 { ··· 33629 z3 = z3_4_8; 33630 z3_4_4_0 = callPackage ../applications/science/logic/z3/4.4.0.nix { 33631 python = python2; 33632 + stdenv = if stdenv.isDarwin then stdenv else gcc49Stdenv; 33633 }; 33634 z3-tptp = callPackage ../applications/science/logic/z3/tptp.nix {}; 33635