From b756d62d8d8a8b7644a7369647ecf6c150b2ff33 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 28 Aug 2021 14:29:24 +0200 Subject: [PATCH] haskell.compiler.ghcHEAD: provide xattr on darwin This darwin specific tool is required for GHC on master nowadays. Unfortunately the XATTR environment variable only works in the GHC 8.10 series. --- pkgs/development/compilers/ghc/head.nix | 6 +++++- pkgs/top-level/haskell-packages.nix | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 6eefc067d6e8..d39adcaab540 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -2,7 +2,7 @@ # build-tools , bootPkgs -, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx +, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx, xattr , bash , libiconv ? null, ncurses @@ -255,6 +255,10 @@ stdenv.mkDerivation (rec { ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour ] ++ lib.optionals enableDocs [ sphinx + ] ++ lib.optionals stdenv.isDarwin [ + # TODO(@sternenseemann): use XATTR env var once we have + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447 + xattr ]; # For building runtime libs diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 587113219dd4..530c3c43f76a 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -126,6 +126,10 @@ in { ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = packages.ghc901; # no binary yet inherit (buildPackages.python3Packages) sphinx; + # Need to use apple's patched xattr until + # https://github.com/xattr/xattr/issues/44 and + # https://github.com/xattr/xattr/issues/55 are solved. + inherit (buildPackages.darwin) xattr; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; libffi = pkgs.libffi;