core/pkgs/build-support/substitute/substitute.sh

25 lines
367 B
Bash
Raw Permalink Normal View History

2024-05-02 00:46:19 +00:00
source $stdenv/setup
args=
target=$out
if test -n "$dir"; then
target=$out/$dir/$name
mkdir -p $out/$dir
fi
substitutionsList=($replacements)
if [[ -v substitutions ]]; then
eval "substitutionsList+=($substitutions)"
fi
substitute $src $target "${substitutionsList[@]}"
if test -n "$isExecutable"; then
chmod +x $target
fi
eval "$postInstall"