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