substituteAllFiles: deprecate

Changed files
+26 -21
doc
release-notes
pkgs
build-support
substitute-files
+1 -1
doc/release-notes/rl-2505.section.md
···
- 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
···
- All support for 32‐bit Darwin systems has been dropped.
+
- `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
+25 -20
pkgs/build-support/substitute-files/substitute-all-files.nix
···
args:
-
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
-
)
···
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
+
)
+
)