summary refs log tree commit diff
path: root/pkgs/build-support/dotnetbuildhelpers/default.nix
blob: 0edfd0b467ab5120faee3aa42b6d0b7751048212 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ runCommand, mono, pkgconfig }:
  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
    ''