From 0d6fec737acbac2bc17205938459f5360c2de95f Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Wed, 3 Nov 2021 14:39:53 -0700 Subject: [PATCH] nix_2_4: fix NIX_LDFLAGS --- pkgs/tools/package-management/nix/default.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 121187c7769c..af8b69b25ad1 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -77,17 +77,12 @@ common = propagatedBuildInputs = [ boehmgc ]; - # Seems to be required when using std::atomic with 64-bit types - NIX_LDFLAGS = - # need to list libraries individually until + NIX_LDFLAGS = lib.optionals (!is24) [ # https://github.com/NixOS/nix/commit/3e85c57a6cbf46d5f0fe8a89b368a43abd26daba - # is in a release - lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto" - - # need to detect it here until + (lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto") # https://github.com/NixOS/nix/commits/74b4737d8f0e1922ef5314a158271acf81cd79f8 - # is in a release - + lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic"; + (lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic") + ]; preConfigure = # Copy libboost_context so we don't get all of Boost in our closure.