mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
substituteAll: deprecate
This commit is contained in:
parent
3bfa33ed99
commit
fe7dba6858
2 changed files with 23 additions and 18 deletions
|
@ -112,6 +112,8 @@
|
||||||
|
|
||||||
- All support for 32‐bit Darwin systems has been dropped.
|
- All support for 32‐bit Darwin systems has been dropped.
|
||||||
|
|
||||||
|
- `substituteAll` has been deprecated in favor of `replaceVars` and will be removed in the next release.
|
||||||
|
|
||||||
- Default ICU version updated from 74 to 76
|
- Default ICU version updated from 74 to 76
|
||||||
|
|
||||||
- Apache Kafka was updated to `>= 4.0.0`. Please note that this is the first release which operates
|
- Apache Kafka was updated to `>= 4.0.0`. Please note that this is the first release which operates
|
||||||
|
|
|
@ -6,21 +6,24 @@ let
|
||||||
isInvalidArgName = x: builtins.match "^[a-z][a-zA-Z0-9_]*$" x == null;
|
isInvalidArgName = x: builtins.match "^[a-z][a-zA-Z0-9_]*$" x == null;
|
||||||
invalidArgs = builtins.filter isInvalidArgName (builtins.attrNames args);
|
invalidArgs = builtins.filter isInvalidArgName (builtins.attrNames args);
|
||||||
in
|
in
|
||||||
if invalidArgs == [ ] then
|
# TODO(@wolfgangwalther): Remove substituteAll, the nix function, after 25.05 branch-off.
|
||||||
stdenvNoCC.mkDerivation (
|
lib.warn "substituteAll is deprecated and will be removed in 25.11. Use replaceVars instead." (
|
||||||
{
|
if invalidArgs == [ ] then
|
||||||
name = if args ? name then args.name else baseNameOf (toString args.src);
|
stdenvNoCC.mkDerivation (
|
||||||
builder = ./substitute-all.sh;
|
{
|
||||||
inherit (args) src;
|
name = if args ? name then args.name else baseNameOf (toString args.src);
|
||||||
preferLocalBuild = true;
|
builder = ./substitute-all.sh;
|
||||||
allowSubstitutes = false;
|
inherit (args) src;
|
||||||
}
|
preferLocalBuild = true;
|
||||||
// args
|
allowSubstitutes = false;
|
||||||
)
|
}
|
||||||
else
|
// args
|
||||||
throw ''
|
)
|
||||||
Argument names for `pkgs.substituteAll` must:
|
else
|
||||||
- start with a lower case ASCII letter
|
throw ''
|
||||||
- only contain ASCII letters, digits and underscores
|
Argument names for `pkgs.substituteAll` must:
|
||||||
Found invalid argument names: ${lib.concatStringsSep ", " invalidArgs}.
|
- start with a lower case ASCII letter
|
||||||
''
|
- only contain ASCII letters, digits and underscores
|
||||||
|
Found invalid argument names: ${lib.concatStringsSep ", " invalidArgs}.
|
||||||
|
''
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue