From a008c419ddc08a5b07dc56cb4f23236e0916cf65 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 28 Aug 2021 14:30:25 +0200 Subject: [PATCH] haskell.compiler.ghc921: provide xattr on darwin GHC 9.2.1-rc1 needs to run xattr in ghc.mk unconditionally. The fix for this and support for the XATTR environment variable have only been added to the GHC 8.10 series so far. --- pkgs/development/compilers/ghc/9.2.1.nix | 6 +++++- pkgs/top-level/haskell-packages.nix | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 46bacd5df1a8..66cc4d6c322e 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -2,7 +2,7 @@ # build-tools , bootPkgs -, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx +, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx, xattr , bash , libiconv ? null, ncurses @@ -238,6 +238,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 after backport of + # 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 530c3c43f76a..a7fb4251f7ed 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -120,6 +120,10 @@ in { else packages.ghc8102Binary; 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; };