From aadc07a3d9217a002d01bebb661d3a71825928e3 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Fri, 12 Feb 2021 12:11:43 +0900 Subject: [PATCH] mc: fix code signature on aarch64-darwin --- pkgs/tools/misc/mc/default.nix | 8 +++++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix index 12aa477219b..6cbe693fb60 100644 --- a/pkgs/tools/misc/mc/default.nix +++ b/pkgs/tools/misc/mc/default.nix @@ -16,6 +16,7 @@ , openssl , coreutils , autoreconfHook +, autoSignDarwinBinariesHook }: stdenv.mkDerivation rec { @@ -27,7 +28,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-xt6txQWV8tmiLcbCmanyizk+NYNG6/bKREqEadwWbCc="; }; - nativeBuildInputs = [ pkg-config autoreconfHook unzip ]; + nativeBuildInputs = [ pkg-config autoreconfHook unzip ] + # The preFixup hook rewrites the binary, which invaliates the code + # signature. Add the fixup hook to sign the output. + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + autoSignDarwinBinariesHook + ]; buildInputs = [ file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2aa1a7b2751..4d5a9443704 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6695,7 +6695,9 @@ in mbutil = python3Packages.callPackage ../applications/misc/mbutil { }; - mc = callPackage ../tools/misc/mc { }; + mc = callPackage ../tools/misc/mc { + inherit (darwin) autoSignDarwinBinariesHook; + }; mcabber = callPackage ../applications/networking/instant-messengers/mcabber { };