Browse Source

substituteAllFiles: support postInstall

nixos-19.03
Nikolay Amiantov 7 years ago
parent
commit
ded1a55b8d
  1. 5
      pkgs/build-support/substitute-files/substitute-all-files.nix

5
pkgs/build-support/substitute-files/substitute-all-files.nix

@ -12,11 +12,14 @@ stdenv.mkDerivation ({
args=
cd "$src"
pushd "$src"
echo -ne "${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;
} // args)

Loading…
Cancel
Save