d4681bf626
- 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.
40 lines
788 B
Nix
40 lines
788 B
Nix
{ stdenv, fetchurl, buildDotnetPackage, unzip }:
|
|
|
|
attrs @
|
|
{ baseName
|
|
, version
|
|
, url ? "https://www.nuget.org/api/v2/package/${baseName}/${version}"
|
|
, sha256 ? ""
|
|
, md5 ? ""
|
|
, ...
|
|
}:
|
|
buildDotnetPackage ({
|
|
src = fetchurl {
|
|
inherit url sha256 md5;
|
|
name = "${baseName}.${version}.zip";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
preInstall = ''
|
|
function traverseRename () {
|
|
for e in *
|
|
do
|
|
t="$(echo "$e" | sed -e "s/%20/\ /g" -e "s/%2B/+/g")"
|
|
[ "$t" != "$e" ] && mv -vn "$e" "$t"
|
|
if [ -d "$t" ]
|
|
then
|
|
cd "$t"
|
|
traverseRename
|
|
cd ..
|
|
fi
|
|
done
|
|
}
|
|
|
|
traverseRename
|
|
'';
|
|
} // attrs)
|