From d7c4d4acad13462f716579897006e3c0faeac6f6 Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Sat, 12 Oct 2024 21:44:23 +1100 Subject: [PATCH] isabelle: fix darwin build The changes to isabelle-sha1 were necessary due to #349555: it results in needing to pass `-syslibroot $SDKROOT` in addition to `-lSystem` when invoking ld64 directly. But a simpler solution was to use $CC instead, since it passes all those flags automatically, which is also how it's built upstream (their build script sets `LD="gcc"`). --- pkgs/by-name/is/isabelle/package.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/is/isabelle/package.nix b/pkgs/by-name/is/isabelle/package.nix index 504213a29ad0..50e0a70fcca4 100644 --- a/pkgs/by-name/is/isabelle/package.nix +++ b/pkgs/by-name/is/isabelle/package.nix @@ -30,14 +30,11 @@ let hash = "sha256-DB/ETVZhbT82IMZA97TmHG6gJcGpFavxDKDTwPzIF80="; }; - buildPhase = (if stdenv.hostPlatform.isDarwin then '' - LDFLAGS="-dynamic -undefined dynamic_lookup -lSystem" - '' else '' - LDFLAGS="-fPIC -shared" - '') + '' + buildPhase = '' CFLAGS="-fPIC -I." + LDFLAGS="-fPIC -shared" $CC $CFLAGS -c sha1.c -o sha1.o - $LD $LDFLAGS sha1.o -o libsha1.so + $CC $LDFLAGS sha1.o -o libsha1.so ''; installPhase = '' @@ -73,8 +70,9 @@ in stdenv.mkDerivation (finalAttrs: rec { nativeBuildInputs = [ java ]; - buildInputs = [ polyml veriT vampire eprover-ho nettools ] - ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ java procps ]; + buildInputs = [ polyml veriT vampire eprover-ho nettools ]; + + propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ procps ]; sourceRoot = "${dirname}${lib.optionalString stdenv.hostPlatform.isDarwin ".app"}"; @@ -221,7 +219,6 @@ in stdenv.mkDerivation (finalAttrs: rec { license = licenses.bsd3; maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ]; platforms = platforms.unix; - broken = stdenv.hostPlatform.isDarwin; }; passthru.withComponents = f: