nixpkgs/pkgs/build-support/dotnetbuildhelpers/default.nix
obadz d4681bf626 Lay down the foundation for packaging the .NET echosystem
- fetchNuGet can fetch binaries from nuget servers
- buildDotnetPackage can build .NET packages using mono/xbuild
  - Places nuget & paket as they would clash with nix
  - Patch project files because F# targets are expected to be found in
    the mono directory (and we know that's not going to happen on nix)
  - Find DLLs that were copied from buildInputs and replace by symlink
    for sharing
  - Export produced DLL via the pkg-config mechanism
  - Create wrappers for produced EXEs
- Repackaged this new infrastructure: keepass, monodevelop
- Newly packaged: ExtCore, UnionArgParser, FSharp.Data, Paket, and a
  bunch more..

This is a combination of 73 commits.
2015-06-06 09:06:22 -04:00

19 lines
750 B
Nix

{ helperFunctions, mono, pkgconfig }:
helperFunctions.runCommand
"dotnetbuildhelpers"
{ preferLocalBuild = true; }
''
target="$out/bin"
mkdir -p "$target"
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 ${pkgconfig}/bin/pkg-config
substituteInPlace "$target"/"$scriptName" --replace monodis ${mono}/bin/monodis
done
''