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,4 +1,4 @@
|
||||
{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? true }:
|
||||
{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert }:
|
||||
|
||||
let
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
@@ -31,11 +31,16 @@ stdenv.mkDerivation rec {
|
||||
# Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
|
||||
enableParallelBuilding = false;
|
||||
|
||||
# We want pkg-config to take priority over the dlls in the Mono framework and the GAC
|
||||
# because we control pkg-config
|
||||
patches = [ ./pkgconfig-before-gac.patch ];
|
||||
|
||||
# Patch all the necessary scripts. Also, if we're using LLVM, we fix the default
|
||||
# LLVM path to point into the Mono LLVM build, since it's private anyway.
|
||||
preBuild = ''
|
||||
makeFlagsArray=(INSTALL=`type -tp install`)
|
||||
patchShebangs ./
|
||||
substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share"
|
||||
'' + stdenv.lib.optionalString withLLVM ''
|
||||
substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")"
|
||||
'';
|
||||
@@ -50,6 +55,14 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
# Without this, any Mono application attempting to open an SSL connection will throw with
|
||||
# The authentication or decryption has failed.
|
||||
# ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server.
|
||||
postInstall = ''
|
||||
echo "Updating Mono key store"
|
||||
$out/bin/cert-sync ${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://mono-project.com/;
|
||||
description = "Cross platform, open source .NET development framework";
|
||||
|
||||
65
pkgs/development/compilers/mono/pkgconfig-before-gac.patch
Normal file
65
pkgs/development/compilers/mono/pkgconfig-before-gac.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
|
||||
--- mono-4.0.1.old/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets 2015-04-24 02:26:18.000000000 +0100
|
||||
+++ mono-4.0.1/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets 2015-05-26 00:52:33.997847464 +0100
|
||||
@@ -229,8 +229,8 @@
|
||||
$(ReferencePath);
|
||||
@(AdditionalReferencePath);
|
||||
{HintPathFromItem};
|
||||
- {TargetFrameworkDirectory};
|
||||
{PkgConfig};
|
||||
+ {TargetFrameworkDirectory};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutDir)
|
||||
diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
|
||||
--- mono-4.0.1.old/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets 2015-04-24 02:26:18.000000000 +0100
|
||||
+++ mono-4.0.1/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets 2015-05-26 00:52:41.832612748 +0100
|
||||
@@ -214,8 +214,8 @@
|
||||
$(ReferencePath);
|
||||
@(AdditionalReferencePath);
|
||||
{HintPathFromItem};
|
||||
- {TargetFrameworkDirectory};
|
||||
{PkgConfig};
|
||||
+ {TargetFrameworkDirectory};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutDir)
|
||||
diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets
|
||||
--- mono-4.0.1.old/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets 2015-04-24 02:26:18.000000000 +0100
|
||||
+++ mono-4.0.1/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets 2015-05-26 00:52:46.298478961 +0100
|
||||
@@ -139,8 +139,8 @@
|
||||
$(ReferencePath);
|
||||
@(AdditionalReferencePath);
|
||||
{HintPathFromItem};
|
||||
- {TargetFrameworkDirectory};
|
||||
{PkgConfig};
|
||||
+ {TargetFrameworkDirectory};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutDir)
|
||||
diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets
|
||||
--- mono-4.0.1.old/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets 2015-04-24 02:26:18.000000000 +0100
|
||||
+++ mono-4.0.1/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets 2015-05-26 00:52:52.119304583 +0100
|
||||
@@ -167,8 +167,8 @@
|
||||
$(ReferencePath);
|
||||
@(AdditionalReferencePath);
|
||||
{HintPathFromItem};
|
||||
- {TargetFrameworkDirectory};
|
||||
{PkgConfig};
|
||||
+ {TargetFrameworkDirectory};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutDir)
|
||||
diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets
|
||||
--- mono-4.0.1.old/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets 2015-04-24 02:26:18.000000000 +0100
|
||||
+++ mono-4.0.1/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets 2015-05-26 00:52:56.519172776 +0100
|
||||
@@ -229,8 +229,8 @@
|
||||
$(ReferencePath);
|
||||
@(AdditionalReferencePath);
|
||||
{HintPathFromItem};
|
||||
- {TargetFrameworkDirectory};
|
||||
{PkgConfig};
|
||||
+ {TargetFrameworkDirectory};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutDir)
|
||||
Reference in New Issue
Block a user