mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
substituteAll{,Files}: drop
This commit is contained in:
parent
223d5291bc
commit
0a666d5335
4 changed files with 2 additions and 66 deletions
|
@ -1,33 +0,0 @@
|
|||
{ lib, stdenv }:
|
||||
|
||||
args:
|
||||
|
||||
# TODO(@wolfgangwalther): Remove substituteAllFiles after 25.05 branch-off.
|
||||
lib.warn
|
||||
"substituteAllFiles is deprecated and will be removed in 25.11. Use replaceVars for each file instead."
|
||||
(
|
||||
stdenv.mkDerivation (
|
||||
{
|
||||
name = if args ? name then args.name else baseNameOf (toString args.src);
|
||||
builder = builtins.toFile "builder.sh" ''
|
||||
set -o pipefail
|
||||
|
||||
eval "$preInstall"
|
||||
|
||||
args=
|
||||
|
||||
pushd "$src"
|
||||
echo -ne "${lib.concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
|
||||
mkdir -p "$out/$(dirname "$line")"
|
||||
substituteAll "$line" "$out/$line"
|
||||
done
|
||||
popd
|
||||
|
||||
eval "$postInstall"
|
||||
'';
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
// args
|
||||
)
|
||||
)
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, stdenvNoCC }:
|
||||
# see the substituteAll in the nixpkgs documentation for usage and constraints
|
||||
args:
|
||||
let
|
||||
# keep this in sync with substituteAll
|
||||
isInvalidArgName = x: builtins.match "^[a-z][a-zA-Z0-9_]*$" x == null;
|
||||
invalidArgs = builtins.filter isInvalidArgName (builtins.attrNames args);
|
||||
in
|
||||
# TODO(@wolfgangwalther): Remove substituteAll, the nix function, after 25.05 branch-off.
|
||||
lib.warn "substituteAll is deprecated and will be removed in 25.11. Use replaceVars instead." (
|
||||
if invalidArgs == [ ] then
|
||||
stdenvNoCC.mkDerivation (
|
||||
{
|
||||
name = if args ? name then args.name else baseNameOf (toString args.src);
|
||||
builder = ./substitute-all.sh;
|
||||
inherit (args) src;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
// args
|
||||
)
|
||||
else
|
||||
throw ''
|
||||
Argument names for `pkgs.substituteAll` must:
|
||||
- start with a lower case ASCII letter
|
||||
- only contain ASCII letters, digits and underscores
|
||||
Found invalid argument names: ${lib.concatStringsSep ", " invalidArgs}.
|
||||
''
|
||||
)
|
|
@ -1806,6 +1806,8 @@ mapAliases {
|
|||
strawberry-qt5 = throw "strawberry-qt5 has been replaced by strawberry-qt6"; # Added 2024-11-22
|
||||
strelka = throw "strelka depends on Python 2.6+, and does not support Python 3."; # Added 2025-03-17
|
||||
subberthehut = throw "'subberthehut' has been removed as it was unmaintained upstream"; # Added 2025-05-17
|
||||
substituteAll = throw "`substituteAll` has been removed. Use `replaceVars` instead."; # Added 2025-05-23
|
||||
substituteAllFiles = throw "`substituteAllFiles` has been removed. Use `replaceVars` for each file instead."; # Added 2025-05-23
|
||||
suidChroot = throw "'suidChroot' has been dropped as it was unmaintained, failed to build and had questionable security considerations"; # Added 2025-05-17
|
||||
suitesparse_4_2 = throw "'suitesparse_4_2' has been removed as it was unmaintained upstream"; # Added 2025-05-17
|
||||
suitesparse_4_4 = throw "'suitesparse_4_4' has been removed as it was unmaintained upstream"; # Added 2025-05-17
|
||||
|
|
|
@ -843,10 +843,6 @@ with pkgs;
|
|||
|
||||
substitute = callPackage ../build-support/substitute/substitute.nix { };
|
||||
|
||||
substituteAll = callPackage ../build-support/substitute/substitute-all.nix { };
|
||||
|
||||
substituteAllFiles = callPackage ../build-support/substitute-files/substitute-all-files.nix { };
|
||||
|
||||
replaceDependencies = callPackage ../build-support/replace-dependencies.nix { };
|
||||
|
||||
replaceDependency =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue