treewide: clean up obsolete version checks

These checks are all redundant with the check for Nix ≥2.2 in
default.nix.

-11
-2
pkgs/build-support/fetchipfs/default.nix
··· 17 17 , preferLocalBuild ? true 18 18 }: 19 19 20 - assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0; 21 - 22 20 let 23 21 24 22 hasHash = (outputHash != "" && outputHashAlgo != "")
-2
pkgs/build-support/fetchurl/default.nix
··· 100 100 , nativeBuildInputs ? [ ] 101 101 }: 102 102 103 - assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0; 104 - 105 103 let 106 104 urls_ = 107 105 if urls != [] && url == "" then
-6
pkgs/build-support/nix-gitignore/default.nix
··· 12 12 let 13 13 debug = a: trace a a; 14 14 last = l: elemAt l ((length l) - 1); 15 - 16 - throwIfOldNix = let required = "2.0"; in 17 - if compareVersions nixVersion required == -1 18 - then throw "nix (v${nixVersion} =< v${required}) is too old for nix-gitignore" 19 - else true; 20 15 in rec { 21 16 # [["good/relative/source/file" true] ["bad.tmpfile" false]] -> root -> path 22 17 filterPattern = patterns: root: ··· 31 26 32 27 # string -> [[regex bool]] 33 28 gitignoreToPatterns = gitignore: 34 - assert throwIfOldNix; 35 29 let 36 30 # ignore -> bool 37 31 isComment = i: (match "^(#.*|$)" i) != null;
-1
pkgs/top-level/all-packages.nix
··· 33779 33779 33780 33780 nix-repl = throw ( 33781 33781 "nix-repl has been removed because it's not maintained anymore, " + 33782 - (lib.optionalString (!lib.versionAtLeast "2" (lib.versions.major builtins.nixVersion)) "ugrade your Nix installation to a newer version and ") + 33783 33782 "use `nix repl` instead. Also see https://github.com/NixOS/nixpkgs/pull/44903" 33784 33783 ); 33785 33784