mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
substituteAllFiles: deprecate
This commit is contained in:
parent
fe7dba6858
commit
ac825aaea5
2 changed files with 26 additions and 21 deletions
|
@ -112,7 +112,7 @@
|
||||||
|
|
||||||
- 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.
|
- `substituteAll` and `substituteAllFiles` have 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
|
||||||
|
|
||||||
|
|
|
@ -2,27 +2,32 @@
|
||||||
|
|
||||||
args:
|
args:
|
||||||
|
|
||||||
stdenv.mkDerivation (
|
# TODO(@wolfgangwalther): Remove substituteAllFiles after 25.05 branch-off.
|
||||||
{
|
lib.warn
|
||||||
name = if args ? name then args.name else baseNameOf (toString args.src);
|
"substituteAllFiles is deprecated and will be removed in 25.11. Use replaceVars for each file instead."
|
||||||
builder = builtins.toFile "builder.sh" ''
|
(
|
||||||
set -o pipefail
|
stdenv.mkDerivation (
|
||||||
|
{
|
||||||
|
name = if args ? name then args.name else baseNameOf (toString args.src);
|
||||||
|
builder = builtins.toFile "builder.sh" ''
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
eval "$preInstall"
|
eval "$preInstall"
|
||||||
|
|
||||||
args=
|
args=
|
||||||
|
|
||||||
pushd "$src"
|
pushd "$src"
|
||||||
echo -ne "${lib.concatStringsSep "\\0" args.files}" | xargs -0 -n1 -I {} -- find {} -type f -print0 | while read -d "" line; do
|
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")"
|
mkdir -p "$out/$(dirname "$line")"
|
||||||
substituteAll "$line" "$out/$line"
|
substituteAll "$line" "$out/$line"
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
eval "$postInstall"
|
eval "$postInstall"
|
||||||
'';
|
'';
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
}
|
}
|
||||||
// args
|
// args
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue