treewide: clean up obsolete version checks

These checks are all redundant with the check for Nix ≥2.2 in
default.nix.
This commit is contained in:
Alyssa Ross 2022-03-17 17:54:19 +00:00
parent cb040db7ab
commit da450f6b1d
4 changed files with 0 additions and 11 deletions

View File

@ -17,8 +17,6 @@
, preferLocalBuild ? true
}:
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
let
hasHash = (outputHash != "" && outputHashAlgo != "")

View File

@ -100,8 +100,6 @@ in
, nativeBuildInputs ? [ ]
}:
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
let
urls_ =
if urls != [] && url == "" then

View File

@ -12,11 +12,6 @@ with builtins;
let
debug = a: trace a a;
last = l: elemAt l ((length l) - 1);
throwIfOldNix = let required = "2.0"; in
if compareVersions nixVersion required == -1
then throw "nix (v${nixVersion} =< v${required}) is too old for nix-gitignore"
else true;
in rec {
# [["good/relative/source/file" true] ["bad.tmpfile" false]] -> root -> path
filterPattern = patterns: root:
@ -31,7 +26,6 @@ in rec {
# string -> [[regex bool]]
gitignoreToPatterns = gitignore:
assert throwIfOldNix;
let
# ignore -> bool
isComment = i: (match "^(#.*|$)" i) != null;

View File

@ -33779,7 +33779,6 @@ with pkgs;
nix-repl = throw (
"nix-repl has been removed because it's not maintained anymore, " +
(lib.optionalString (!lib.versionAtLeast "2" (lib.versions.major builtins.nixVersion)) "ugrade your Nix installation to a newer version and ") +
"use `nix repl` instead. Also see https://github.com/NixOS/nixpkgs/pull/44903"
);