From 2ba48cc8dee2249526efeda1d2c629a2ec625229 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Wed, 12 Apr 2023 09:42:04 -0700 Subject: [PATCH] nim: propagate Security framework to all nim packages on darwin Many nim packages regressed on darwin after 31254120db53fe07d9f1f05fa8ff41af8feaac03, which upgrade nim to 1.6.12. The cause of the breakage is that the nim standard library was changed to link against the Security framework when using the system rng on darwin. Notably not *all* nim packages were broken by this, since packages that don't use this part of the standard library don't need the framework to build. This commit adds the Security framework to the depsTargetTargetPropagated for the compiler wrapper, since the standard library isn't fully functional without it. --- pkgs/development/compilers/nim/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix index c9cdfc6bdf48..9d099f5c7082 100644 --- a/pkgs/development/compilers/nim/default.nix +++ b/pkgs/development/compilers/nim/default.nix @@ -203,6 +203,10 @@ in { nativeBuildInputs = [ makeWrapper ]; + # Needed for any nim package that uses the standard library's + # 'std/sysrand' module. + depsTargetTargetPropagated = lib.optional stdenv.isDarwin Security; + patches = [ ./nim.cfg.patch # Remove configurations that clash with ours