Skip to content

Instantly share code, notes, and snippets.

@juselius
Last active February 17, 2017 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juselius/20110f41a3a19694e3241501be7fd451 to your computer and use it in GitHub Desktop.
Save juselius/20110f41a3a19694e3241501be7fd451 to your computer and use it in GitHub Desktop.
NixOS fix for MSBuild/XBuild .fsproj files
#!/usr/bin/env bash
sed -i '
/<OutputType>/a \
<MonoLibraryPath>/run/current-system/sw/lib/mono/4.5/</MonoLibraryPath>
/Microsoft.FSharp.Targets/,/<Import Project=.*FSharpTargetsPath/ {
/\/Otherwise/i \
<PropertyGroup Condition="Exists(\x27$(MonoLibraryPath)/Microsoft.FSharp.Targets\x27)">\
<FSharpTargetsPath>$(MonoLibraryPath)/Microsoft.FSharp.Targets</FSharpTargetsPath>\
</PropertyGroup>
}
' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment