treewide: clean up obsolete version checks

These checks are all redundant with the check for Nix ≥2.2 in
default.nix.
main
Alyssa Ross 2 years ago
parent cb040db7ab
commit da450f6b1d
  1. 2
      pkgs/build-support/fetchipfs/default.nix
  2. 2
      pkgs/build-support/fetchurl/default.nix
  3. 6
      pkgs/build-support/nix-gitignore/default.nix
  4. 1
      pkgs/top-level/all-packages.nix

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

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

@ -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;

@ -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"
);

Loading…
Cancel
Save