mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
7914de9b8c
Similar to the colocated `substituteAll` script and derivation, this PR adds nix-level support for `substitute` directly. This is useful, for instance, to be able to easily make tweaks to patch files for an existing derivation's existing patch files.
19 lines
237 B
Bash
19 lines
237 B
Bash
source $stdenv/setup
|
|
|
|
args=
|
|
|
|
target=$out
|
|
if test -n "$dir"; then
|
|
target=$out/$dir/$name
|
|
mkdir -p $out/$dir
|
|
fi
|
|
|
|
substitute $src $target $replacements
|
|
|
|
if test -n "$isExecutable"; then
|
|
chmod +x $target
|
|
fi
|
|
|
|
eval "$postInstall"
|
|
|