Skip to content

Commit d177909

Browse files
haskell.compiler.ghc902Binary: workaround com.apple.provenance xattr
See #413450. (Ported from 759f224.)
1 parent 49b74e0 commit d177909

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pkgs/development/compilers/ghc/9.0.2-binary.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,15 @@ stdenv.mkDerivation {
350350
# calls install-strip ...
351351
dontBuild = true;
352352

353+
# GHC tries to remove xattrs when installing to work around Gatekeeper
354+
# (see https://gitlab.haskell.org/ghc/ghc/-/issues/17418). This step normally
355+
# succeeds in nixpkgs because xattrs are not allowed in the store, but it
356+
# can fail when a file has the `com.apple.provenance` xattr, and it can’t be
357+
# modified (such as target of the symlink to `libiconv.dylib`).
358+
# The `com.apple.provenance` xattr is a new feature of macOS as of macOS 13.
359+
# See: https://eclecticlight.co/2023/03/13/ventura-has-changed-app-quarantine-with-a-new-xattr/
360+
makeFlags = lib.optionals stdenv.buildPlatform.isDarwin [ "XATTR=/does-not-exist" ];
361+
353362
# Patch scripts to include runtime dependencies in $PATH.
354363
postInstall = ''
355364
for i in "$out/bin/"*; do

0 commit comments

Comments
 (0)