forked from mirrors/nixpkgs
nixVersions.minver: init
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
04db3589a8
commit
29124b85cf
|
@ -182,6 +182,23 @@ in lib.makeExtensible (self: {
|
|||
sha256 = "sha256-hNHfvmb1bIWwqFT5nesQgwh4V0OlyZHxj5ZVSQbZ+p4=";
|
||||
};
|
||||
|
||||
# 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
|
||||
# in the actual lowest minver.nix *patch* version.
|
||||
minimum =
|
||||
let
|
||||
minver = import ../../../../lib/minver.nix;
|
||||
major = lib.versions.major minver;
|
||||
minor = lib.versions.minor minver;
|
||||
attribute = "nix_${major}_${minor}";
|
||||
nix = self.${attribute};
|
||||
in
|
||||
if ! self ? ${attribute} then
|
||||
throw "The minimum supported Nix version is ${minver} (declared in lib/minver.nix), but pkgs.nixVersions.${attribute} does not exist."
|
||||
else
|
||||
nix;
|
||||
|
||||
stable = self.nix_2_13;
|
||||
|
||||
unstable = self.nix_2_15;
|
||||
|
|
Loading…
Reference in a new issue