From 044e86024237a48194fd2b5c9dae92e5c2c36451 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 8 Nov 2021 23:44:35 +0100 Subject: [PATCH 1/3] haskell.compiler.ghc921: fix aarch64-darwin build by applying autoSignDarwinBinariesHook --- pkgs/development/compilers/ghc/9.2.1.nix | 7 +++++-- pkgs/top-level/haskell-packages.nix | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 90dea665e6d6..e43dea9cffb7 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -2,7 +2,8 @@ # build-tools , bootPkgs -, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, xattr +, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx +, xattr, autoSignDarwinBinariesHook , bash , libiconv ? null, ncurses @@ -43,7 +44,7 @@ enableDocs ? ( # Docs disabled for musl and cross because it's a large task to keep # all `sphinx` dependencies building in those environments. - # `sphinx` pullls in among others: + # `sphinx` pulls in among others: # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. (stdenv.targetPlatform == stdenv.hostPlatform) && !stdenv.hostPlatform.isMusl @@ -242,6 +243,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 ] ++ lib.optionals stdenv.isDarwin [ diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 3b89aabf1fd1..68c0007c5363 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -122,7 +122,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_10; llvmPackages = pkgs.llvmPackages_10; }; From 3b9e94dc6c0b2ad44c885990d54fb41990fd037c Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 8 Nov 2021 23:51:53 +0100 Subject: [PATCH 2/3] haskell.compiler.ghc901: fix aarch64-darwin build by applying autoSignDarwinBinariesHook --- pkgs/development/compilers/ghc/9.0.1.nix | 3 +++ pkgs/top-level/haskell-packages.nix | 1 + 2 files changed, 4 insertions(+) diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index a673276239a2..c0f42680bb87 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -3,6 +3,7 @@ # build-tools , bootPkgs , autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx +, autoSignDarwinBinariesHook , bash , libiconv ? null, ncurses @@ -243,6 +244,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 68c0007c5363..5275a271b0d5 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -108,6 +108,7 @@ in { else packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; + inherit (buildPackages.darwin) autoSignDarwinBinariesHook; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10; }; From 155b7f01143a91f7c0d176726b621adac691eab6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 8 Nov 2021 23:57:26 +0100 Subject: [PATCH 3/3] haskell.compiler.ghcHEAD: apply autoSignDarwinBinariesHook --- pkgs/development/compilers/ghc/head.nix | 5 ++++- pkgs/top-level/haskell-packages.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 9cca803ab279..9c0dd63f1b9d 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -2,7 +2,8 @@ # build-tools , bootPkgs -, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx, xattr +, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx +, xattr, autoSignDarwinBinariesHook , bash , libiconv ? null, ncurses @@ -263,6 +264,8 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ perl autoconf autoreconfHook 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 5275a271b0d5..6401337cf0f0 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -133,7 +133,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_10; llvmPackages = pkgs.llvmPackages_10; libffi = pkgs.libffi;