mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
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:
parent
cb040db7ab
commit
da450f6b1d
@ -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…
Reference in New Issue
Block a user