From 45c637d8a018ac670c784a9ffc89ed3013e8d6a9 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 20 Sep 2018 21:48:06 -0400 Subject: [PATCH] haskellPackages.x509-system: Override based on the host, not target platform There were many reverts back and forth, but it ultimately appears that I am the source of this mistake. I clarified the comment so as not to confuse myself or anyone else. --- pkgs/development/haskell-modules/configuration-nix.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index d363d2e87b69..cf53f9e2b510 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -126,9 +126,9 @@ self: super: builtins.intersectAttrs super { # the system-fileio tests use canonicalizePath, which fails in the sandbox system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio; - # Prevents needing to add security_tool as a build tool to all of x509-system's - # dependencies. - x509-system = if pkgs.stdenv.targetPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc + # Prevents needing to add `security_tool` as a run-time dependency for + # everything using x509-system to give access to the `security` executable. + x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc then let inherit (pkgs.darwin) security_tool; in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { postPatch = (drv.postPatch or "") + ''