Merge pull request #178731 from shlevy/isabelle-darwin

Fix isabelle on darwin
main
Shea Levy 2 years ago committed by GitHub
commit e9e3a5af33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      pkgs/applications/science/logic/isabelle/default.nix
  2. 2
      pkgs/applications/science/logic/z3/4.4.0.nix
  3. 6
      pkgs/development/compilers/gcc/4.9/default.nix
  4. 10
      pkgs/development/compilers/gcc/common/pre-configure.nix
  5. 5
      pkgs/top-level/all-packages.nix

@ -47,10 +47,15 @@ in stdenv.mkDerivation rec {
sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i";
};
buildInputs = [ polyml z3 veriT vampire eprover-ho ]
++ lib.optionals (!stdenv.isDarwin) [ nettools java ];
buildInputs = [ polyml z3 veriT vampire eprover-ho nettools ]
++ lib.optionals (!stdenv.isDarwin) [ java ];
sourceRoot = dirname;
sourceRoot = "${dirname}${lib.optionalString stdenv.isDarwin ".app"}";
postUnpack = if stdenv.isDarwin then ''
mv $sourceRoot ${dirname}
sourceRoot=${dirname}
'' else null;
postPatch = ''
patchShebangs .
@ -112,6 +117,9 @@ in stdenv.mkDerivation rec {
--replace '"$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so")' '"${sha1}/lib/libsha1.so"'
rm -r heaps
'' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
substituteInPlace lib/scripts/isabelle-platform \
--replace 'ISABELLE_APPLE_PLATFORM64=arm64-darwin' ""
'' + (if ! stdenv.isLinux then "" else ''
arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do
@ -180,7 +188,7 @@ in stdenv.mkDerivation rec {
homepage = "https://isabelle.in.tum.de/";
license = licenses.bsd3;
maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ];
platforms = platforms.linux;
platforms = platforms.unix;
};
} // {
withComponents = f:

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
buildInputs = [ python ];
enableParallelBuilding = true;
CXXFLAGS = if stdenv.isDarwin then "-std=gnu++98" else null;
configurePhase = "python scripts/mk_make.py --prefix=$out && cd build";
# z3's install phase is stupid because it tries to calculate the

@ -154,7 +154,10 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" "pie" ];
outputs = if langJava || langGo then ["out" "man" "info"]
# When targetting darwin, libgcc_ext.10.{4,5}.dylib are created as
# MH_DYLIB_STUB files, which install_name_tool can't change, so we
# get a cycle between $out and $lib.
outputs = if langJava || langGo || targetPlatform.isDarwin then ["out" "man" "info"]
else [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
@ -328,7 +331,6 @@ stdenv.mkDerivation ({
maintainers = with lib.maintainers; [ veprbl ];
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.darwin;
};
}

@ -6,14 +6,16 @@
, langGo }:
assert langJava -> lib.versionOlder version "7";
assert langAda -> gnatboot != null;
lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
assert langAda -> gnatboot != null; let
needsLib
= (lib.versionOlder version "7" && (langJava || langGo))
|| (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin);
in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
'' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) ''
'' + lib.optionalString needsLib ''
export lib=$out;
'' + lib.optionalString langAda ''
export PATH=${gnatboot}/bin:$PATH

@ -12812,6 +12812,9 @@ with pkgs;
isl = if !stdenv.isDarwin then isl_0_11 else null;
cloog = if !stdenv.isDarwin then cloog_0_18_0 else null;
# Build fails on Darwin with clang
stdenv = if stdenv.isDarwin then gccStdenv else stdenv;
}));
gcc6 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/6 {
@ -33626,7 +33629,7 @@ with pkgs;
z3 = z3_4_8;
z3_4_4_0 = callPackage ../applications/science/logic/z3/4.4.0.nix {
python = python2;
stdenv = gcc49Stdenv;
stdenv = if stdenv.isDarwin then stdenv else gcc49Stdenv;
};
z3-tptp = callPackage ../applications/science/logic/z3/tptp.nix {};

Loading…
Cancel
Save