From e0b89affa04465a31c8564b49518a2eaad95573f Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 24 Aug 2021 17:17:07 +0200 Subject: [PATCH] haskellPackages: fix ghc build on aarch64-darwin by adding autoSignDarwinBinariesHook to nativeBuildInputs --- pkgs/development/compilers/ghc/8.10.6.nix | 5 ++++- pkgs/top-level/haskell-packages.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.6.nix b/pkgs/development/compilers/ghc/8.10.6.nix index f1223deed85e..a11be3b47dc7 100644 --- a/pkgs/development/compilers/ghc/8.10.6.nix +++ b/pkgs/development/compilers/ghc/8.10.6.nix @@ -2,7 +2,8 @@ # build-tools , bootPkgs -, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx, xattr +, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx +, xattr, autoSignDarwinBinariesHook , bash , libiconv ? null, ncurses @@ -249,6 +250,8 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ perl autoconf automake m4 python3 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ sphinx ]; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 4ef012b9b4f5..10455405af42 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -96,7 +96,7 @@ in { # 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; + inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; buildLlvmPackages = buildPackages.llvmPackages_9; llvmPackages = pkgs.llvmPackages_9; };