about summary refs log tree commit diff
path: root/pkgs/tools/package-management/nix/default.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-04-22 10:09:39 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2024-04-28 21:59:04 +0200
commit2b4e18f3d4a7b80af21b640c0970f83b34efceff (patch)
tree25415d65af7b51a088f30e9ef98add5ea53d07af /pkgs/tools/package-management/nix/default.nix
parentf7ae5ead090e8b217e425d0326d83cb857a5c518 (diff)
nixVersions.unstable: build from master, re-init at 2.22.0.pre20240321_6fd2f42c
The idea behind that is to enable users and developers of
downstream tools such as home-manager to test Nix master for several
reasons:

* Nix is currently trying to have a `master` branch that's always
  releasable[1]. We're still on Nix 2.18 in nixpkgs due to too many
  notable regressions. Enabling people to test latest master may help on
  that end.

* This uses the most bleeding-edge Nix, but our packaging, so we can
  identify issues with our packaging early.

* From what I've seen, most people are using the packages from nixpkgs
  anyways instead of the upstream flake, this is far more convenient
  anyways.

My plan is to update this once a week. Right now we rely on the
`installCheckPhase` here, but as soon as we have proper regression
testing[2], we may want to add `nixUnstable` there as well (however with
failures being allowed probably).

[1] https://discourse.nixos.org/t/nix-release-schedule-and-roadmap/14204
[2] https://github.com/NixOS/nixpkgs/pull/304332
Diffstat (limited to 'pkgs/tools/package-management/nix/default.nix')
-rw-r--r--pkgs/tools/package-management/nix/default.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 3eb49fb62b3d7..1522f141da7ca 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -179,6 +179,19 @@ in lib.makeExtensible (self: ({
     hash = "sha256-Ugcc+lSq8nJP+mddMlGFnoG4Ix1lRFHWOal3299bqR8=";
   };
 
+  git = common rec {
+    version = "2.22.0";
+    suffix = "pre20240421_${lib.substring 0 8 src.rev}";
+    src = fetchFromGitHub {
+      owner = "NixOS";
+      repo = "nix";
+      rev = "6fd2f42c2defd210e17ec95653110fc58858dba9";
+      hash = "sha256-DjkxYMcG52APiADdEtXL1FNVSxNXRBw78LYctly93j0=";
+    };
+  };
+
+  latest = self.nix_2_21;
+
   # The minimum Nix version supported by Nixpkgs
   # Note that some functionality *might* have been backported into this Nix version,
   # making this package an inaccurate representation of what features are available
@@ -197,8 +210,6 @@ in lib.makeExtensible (self: ({
       nix;
 
   stable = addFallbackPathsCheck self.nix_2_18;
-
-  unstable = self.nix_2_22;
 } // lib.optionalAttrs config.allowAliases (
   lib.listToAttrs (map (
     minor:
@@ -207,4 +218,7 @@ in lib.makeExtensible (self: ({
     in
     lib.nameValuePair attr (throw "${attr} has been removed")
   ) (lib.range 4 17))
+  // {
+    unstable = throw "nixVersions.unstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.";
+  }
 )))