core/pkgs/build-support/dotnet/dotnetbuildhelpers/default.nix

18 lines
703 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
{ runCommand, mono, pkg-config }:
2024-05-13 21:24:10 +00:00
runCommand "dotnetbuildhelpers" { preferLocalBuild = true; } ''
target="$out/bin"
mkdir -p "$target"
2024-05-02 00:46:19 +00:00
2024-05-13 21:24:10 +00:00
for script in ${./create-pkg-config-for-dll.sh} ${
./patch-fsharp-targets.sh
} ${./remove-duplicated-dlls.sh} ${./placate-nuget.sh} ${./placate-paket.sh}
do
scriptName="$(basename "$script" | cut -f 2- -d -)"
cp -v "$script" "$target"/"$scriptName"
chmod 755 "$target"/"$scriptName"
patchShebangs "$target"/"$scriptName"
substituteInPlace "$target"/"$scriptName" --replace pkg-config ${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config
substituteInPlace "$target"/"$scriptName" --replace monodis ${mono}/bin/monodis
done
''