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.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ stdenv, fetchurl, fetchgit
|
||||
{ stdenv, fetchurl, fetchgit, fetchNuGet
|
||||
, autoconf, automake, pkgconfig, shared_mime_info, intltool
|
||||
, glib, mono, gtk-sharp, gnome, gnome-sharp, unzip
|
||||
, dotnetPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -13,79 +14,33 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1bgqvlfi6pilj2zxsviqilh63qq98wsijqdiqwpkqchcw741zlyn";
|
||||
};
|
||||
|
||||
srcNugetBinary = fetchgit {
|
||||
url = "https://github.com/mono/nuget-binary.git";
|
||||
rev = "da1f2102f8172df6f7a1370a4998e3f88b91c047";
|
||||
sha256 = "1hbnckc4gvqkknf8gh1k7iwqb4vdzifdjd19i60fnczly5v8m1c3";
|
||||
};
|
||||
|
||||
srcNUnit = fetchurl {
|
||||
url = "https://www.nuget.org/api/v2/package/NUnit/2.6.3";
|
||||
sha256 = "0bb16i4ggwz32wkxsh485wf014cqqzhbyx0b3wbpmqjw7p4canph";
|
||||
};
|
||||
|
||||
srcNUnitRunners = fetchurl {
|
||||
url = "https://www.nuget.org/api/v2/package/NUnit.Runners/2.6.3";
|
||||
sha256 = "0qwx1i9lxkp9pijj2bsczzgsamz651hngkxraqjap1v4m7d09a3b";
|
||||
};
|
||||
|
||||
srcNUnit2510 = fetchurl {
|
||||
nunit2510 = fetchurl {
|
||||
url = "http://launchpad.net/nunitv2/2.5/2.5.10/+download/NUnit-2.5.10.11092.zip";
|
||||
sha256 = "0k5h5bz1p2v3d0w0hpkpbpvdkcszgp8sr9ik498r1bs72w5qlwnc";
|
||||
};
|
||||
|
||||
srcNugetSystemWebMvcExtensions = fetchurl {
|
||||
url = https://www.nuget.org/api/v2/package/System.Web.Mvc.Extensions.Mvc.4/1.0.9;
|
||||
sha256 = "19wi662m8primpimzifv8k560m6ymm73z0mf1r8ixl0xqag1hx6j";
|
||||
};
|
||||
|
||||
srcNugetMicrosoftAspNetMvc = fetchurl {
|
||||
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/5.2.2;
|
||||
sha256 = "1jwfmz42kw2yb1g2hgp2h34fc4wx6s8z71da3mw5i4ivs25w9n2b";
|
||||
};
|
||||
|
||||
srcNugetMicrosoftAspNetRazor = fetchurl {
|
||||
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.Razor/3.2.2;
|
||||
sha256 = "1db3apn4vzz1bx6q5fyv6nyx0drz095xgazqbw60qnhfs7z45axd";
|
||||
};
|
||||
|
||||
srcNugetMicrosoftAspNetWebPages = fetchurl {
|
||||
url = https://www.nuget.org/api/v2/package/Microsoft.AspNet.WebPages/3.2.2;
|
||||
sha256 = "17fwb5yj165sql80i47zirjnm0gr4n8ypz408mz7p8a1n40r4i5l";
|
||||
};
|
||||
|
||||
srcNugetMicrosoftWebInfrastructure = fetchurl {
|
||||
url = https://www.nuget.org/api/v2/package/Microsoft.Web.Infrastructure/1.0.0.0;
|
||||
sha256 = "1mxl9dri5729d0jl84gkpqifqf4xzb6aw1rzcfh6l0r24bix9afn";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# From https://bugzilla.xamarin.com/show_bug.cgi?id=23696#c19
|
||||
|
||||
# it seems parts of MonoDevelop 5.2+ need NUnit 2.6.4, which isn't included
|
||||
# (?), so download it and put it in the right place in the tree
|
||||
mkdir packages
|
||||
unzip ${srcNUnit} -d packages/NUnit.2.6.3
|
||||
unzip ${srcNUnitRunners} -d packages/NUnit.Runners.2.6.3
|
||||
|
||||
# cecil needs NUnit 2.5.10 - this is also missing from the tar
|
||||
unzip -j ${srcNUnit2510} -d external/cecil/Test/libs/nunit-2.5.10 NUnit-2.5.10.11092/bin/net-2.0/framework/\*
|
||||
unzip -j ${nunit2510} -d external/cecil/Test/libs/nunit-2.5.10 NUnit-2.5.10.11092/bin/net-2.0/framework/\*
|
||||
|
||||
# the tar doesn't include the nuget binary, so grab it from github and copy it
|
||||
# into the right place
|
||||
cp -vfR ${srcNugetBinary}/* external/nuget-binary/
|
||||
|
||||
# AspNet plugin requires these packages
|
||||
unzip ${srcNugetSystemWebMvcExtensions} -d packages/System.Web.Mvc.Extensions.Mvc.4.1.0.9
|
||||
unzip ${srcNugetMicrosoftAspNetMvc} -d packages/Microsoft.AspNet.Mvc.5.2.2
|
||||
unzip ${srcNugetMicrosoftAspNetRazor} -d packages/Microsoft.AspNet.Razor.3.2.2
|
||||
unzip ${srcNugetMicrosoftAspNetWebPages} -d packages/Microsoft.AspNet.WebPages.3.2.2
|
||||
unzip ${srcNugetMicrosoftWebInfrastructure} -d packages/Microsoft.Web.Infrastructure.1.0.0.0
|
||||
cp -vfR "$(dirname $(pkg-config NuGet.Core --variable=Libraries))"/* external/nuget-binary/
|
||||
'';
|
||||
|
||||
# Revert this commit which broke the ability to use pkg-config to locate dlls
|
||||
patchFlags = [ "-p2" ];
|
||||
patches = [ ./git-revert-12d610fb3f6dce121df538e36f21d8c2eeb0a6e3.patch ];
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake pkgconfig shared_mime_info intltool
|
||||
mono gtk-sharp gnome-sharp unzip
|
||||
pkgconfig
|
||||
dotnetPackages.NUnit
|
||||
dotnetPackages.NUnitRunners
|
||||
dotnetPackages.Nuget
|
||||
];
|
||||
|
||||
preConfigure = "patchShebangs ./configure";
|
||||
@@ -108,6 +63,12 @@ stdenv.mkDerivation rec {
|
||||
>
|
||||
EOF
|
||||
done
|
||||
|
||||
# Without this, you get a missing DLL error any time you install an addin..
|
||||
ln -sv `pkg-config nunit.core --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
||||
ln -sv `pkg-config nunit.core.interfaces --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
||||
ln -sv `pkg-config nunit.framework --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
||||
ln -sv `pkg-config nunit.util --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet.csproj b/main/src/addins/AspNet/MonoDevelop.AspNet.csproj
|
||||
index 02d3a01..c6daaad 100644
|
||||
--- a/main/src/addins/AspNet/MonoDevelop.AspNet.csproj
|
||||
+++ b/main/src/addins/AspNet/MonoDevelop.AspNet.csproj
|
||||
@@ -452,34 +452,6 @@
|
||||
<None Include="Templates\Projects\WebApplication.xpt.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll">
|
||||
- <Link>System.Web.Mvc.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll">
|
||||
- <Link>System.Web.Razor.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.Helpers.dll">
|
||||
- <Link>System.Web.Helpers.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Deployment.dll">
|
||||
- <Link>System.Web.WebPages.Deployment.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.dll">
|
||||
- <Link>System.Web.WebPages.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Razor.dll">
|
||||
- <Link>System.Web.WebPages.Razor.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
- <None Include="..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll">
|
||||
- <Link>Microsoft.Web.Infrastructure.dll</Link>
|
||||
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
- </None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
diff --git a/main/src/addins/AspNet/Properties/MonoDevelop.AspNet.addin.xml b/main/src/addins/AspNet/Properties/MonoDevelop.AspNet.addin.xml
|
||||
index eab7c32..4a75311 100644
|
||||
--- a/main/src/addins/AspNet/Properties/MonoDevelop.AspNet.addin.xml
|
||||
+++ b/main/src/addins/AspNet/Properties/MonoDevelop.AspNet.addin.xml
|
||||
@@ -1,13 +1,6 @@
|
||||
<ExtensionModel>
|
||||
|
||||
<Runtime>
|
||||
- <Import assembly = "System.Web.Helpers.dll" />
|
||||
- <Import assembly = "System.Web.Mvc.dll" />
|
||||
- <Import assembly = "System.Web.Razor.dll" />
|
||||
- <Import assembly = "System.Web.WebPages.Deployment.dll" />
|
||||
- <Import assembly = "System.Web.WebPages.dll" />
|
||||
- <Import assembly = "System.Web.WebPages.Razor.dll" />
|
||||
-
|
||||
<Import file = "Html/Schemas/xhtml1-strict.xsd" />
|
||||
<Import file = "Html/Schemas/xhtml1-transitional.xsd" />
|
||||
<Import file = "Html/Schemas/xhtml1-frameset.xsd" />
|
||||
Reference in New Issue
Block a user