From a1be7cb1c3efe7006984fb15a72afc83889ea356 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Wed, 26 Jan 2022 10:44:03 -0800 Subject: [PATCH] nixVersions: init --- pkgs/tools/package-management/nix/default.nix | 38 ++++++++++--------- pkgs/top-level/aliases.nix | 9 ++++- pkgs/top-level/all-packages.nix | 17 +++------ 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index c600bca83e79..3d9f393e76db 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -43,21 +43,12 @@ let inherit boehmgc patches Security; inherit storeDir stateDir confDir; }; -in { - nix_2_3 = buildNix rec { - version = "2.3.16"; - src = fetchurl { - url = "https://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz"; - sha256 = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw="; - }; - boehmgc = boehmgc_nix_2_3; - }; +in rec { + stable = nix_2_6; - nix_2_4 = buildNix { - version = "2.4"; - sha256 = "sha256-op48CCDgLHK0qV1Batz4Ln5FqBiRjlE6qHTiZgt3b6k="; - # https://github.com/NixOS/nix/pull/5537 - patches = [ ./patches/install-nlohmann_json-headers.patch ]; + nix_2_6 = buildNix { + version = "2.6.0"; + sha256 = "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg="; }; nix_2_5 = buildNix { @@ -67,12 +58,23 @@ in { patches = [ ./patches/install-nlohmann_json-headers.patch ]; }; - nix_2_6 = buildNix { - version = "2.6.0"; - sha256 = "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg="; + nix_2_4 = buildNix { + version = "2.4"; + sha256 = "sha256-op48CCDgLHK0qV1Batz4Ln5FqBiRjlE6qHTiZgt3b6k="; + # https://github.com/NixOS/nix/pull/5537 + patches = [ ./patches/install-nlohmann_json-headers.patch ]; }; - nixUnstable = lib.lowPrio (buildNix rec { + nix_2_3 = buildNix rec { + version = "2.3.16"; + src = fetchurl { + url = "https://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz"; + sha256 = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw="; + }; + boehmgc = boehmgc_nix_2_3; + }; + + unstable = lib.lowPrio (buildNix rec { version = "2.7"; suffix = "pre20220124_${lib.substring 0 7 src.rev}"; src = fetchFromGitHub { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7d9d56ba2696..593c8dddd365 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -663,8 +663,13 @@ mapAliases ({ nilfs_utils = nilfs-utils; # added 2018-04-25 nix-direnv-flakes = nix-direnv; nix-review = nixpkgs-review; # added 2019-12-22 - nixFlakes = nix; # added 2021-05-21 - nixStable = nix; # added-2022-01-24 + nixFlakes = nixVersions.stable; # added 2021-05-21 + nixStable = nixVersions.stable; # added 2022-01-24 + nixUnstable = nixVersions.unstable; # added 2022-01-26 + nix_2_3 = nixVersions.nix_2_3; + nix_2_4 = nixVersions.nix_2_4; + nix_2_5 = nixVersions.nix_2_5; + nix_2_6 = nixVersions.nix_2_6; 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 3c7d56d363c9..23848929cdae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33128,18 +33128,13 @@ with pkgs; neo = callPackage ../applications/misc/neo { }; - inherit (callPackage ../tools/package-management/nix { - storeDir = config.nix.storeDir or "/nix/store"; - stateDir = config.nix.stateDir or "/nix/var"; - inherit (darwin.apple_sdk.frameworks) Security; - }) - nix_2_3 - nix_2_4 - nix_2_5 - nix_2_6 - nixUnstable; + nixVersions = callPackage ../tools/package-management/nix { + storeDir = config.nix.storeDir or "/nix/store"; + stateDir = config.nix.stateDir or "/nix/var"; + inherit (darwin.apple_sdk.frameworks) Security; + }; - nix = nix_2_5; + nix = nixVersions.stable; nixStatic = pkgsStatic.nix;