2014-10-06 16:28:32 +02:00
|
|
|
{ stdenv }:
|
|
|
|
|
|
|
|
args:
|
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
|
|
|
name = if args ? name then args.name else baseNameOf (toString args.src);
|
|
|
|
builder = with stdenv.lib; builtins.toFile "builder.sh" ''
|
|
|
|
source $stdenv/setup
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
eval "$preInstall"
|
|
|
|
|
|
|
|
args=
|
|
|
|
|
2016-01-09 19:24:26 +01:00
|
|
|
pushd "$src"
|
2014-10-06 16:28:32 +02:00
|
|
|
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
|
2016-01-09 19:24:26 +01:00
|
|
|
popd
|
|
|
|
|
|
|
|
eval "$postInstall"
|
2014-10-06 16:28:32 +02:00
|
|
|
'';
|
|
|
|
preferLocalBuild = true;
|
2019-02-08 01:22:51 +01:00
|
|
|
allowSubstitutes = false;
|
2014-10-06 16:28:32 +02:00
|
|
|
} // args)
|