diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index db9b2c9465fa..7df444177c5e 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. @@ -152,7 +147,7 @@ common = export TMPDIR=$NIX_BUILD_TOP ''; - separateDebugInfo = stdenv.isLinux; + separateDebugInfo = stdenv.isLinux && (is24 -> !enableStatic); enableParallelBuilding = true; @@ -218,7 +213,9 @@ in rec { nix = nixStable; - nixStable = callPackage common (rec { + nixStable = nix_2_3; + + nix_2_3 = callPackage common (rec { pname = "nix"; version = "2.3.16"; src = fetchurl { @@ -233,13 +230,13 @@ in rec { nix_2_4 = callPackage common (rec { pname = "nix"; - version = "2.4pre-rc1"; + version = "2.4"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; - sha256 = "sha256-KOb8etMm5LksvT2l+CkvqzMO1bgmo9tJmyaNh0LvaR8="; + sha256 = "sha256-op48CCDgLHK0qV1Batz4Ln5FqBiRjlE6qHTiZgt3b6k="; }; boehmgc = boehmgc_nixUnstable; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 388da7860a17..a320f6a29a29 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -590,7 +590,7 @@ mapAliases ({ nginxUnstable = nginxMainline; # added 2018-04-25 nilfs_utils = nilfs-utils; # added 2018-04-25 nix-review = nixpkgs-review; # added 2019-12-22 - nixFlakes = nixUnstable; # added 2021-05-21 + nixFlakes = nix_2_4; # added 2021-05-21 nmap_graphical = nmap-graphical; # added 2017-01-19 nmap-unfree = nmap; # added 2021-04-06 nologin = shadow; # added 2018-04-25 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7fbbf80de40..56c15d52b3d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32252,6 +32252,7 @@ with pkgs; }) nix nixStable + nix_2_3 nix_2_4 nixUnstable;