mono: remove llvm build (#391966)
This commit is contained in:
@@ -9,11 +9,9 @@
|
||||
perl,
|
||||
libgdiplus,
|
||||
libX11,
|
||||
callPackage,
|
||||
ncurses,
|
||||
zlib,
|
||||
bash,
|
||||
withLLVM ? false,
|
||||
cacert,
|
||||
Foundation,
|
||||
libobjc,
|
||||
@@ -32,9 +30,6 @@
|
||||
env ? { },
|
||||
}:
|
||||
|
||||
let
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mono";
|
||||
inherit version env;
|
||||
@@ -72,16 +67,11 @@ stdenv.mkDerivation rec {
|
||||
libobjc
|
||||
];
|
||||
|
||||
configureFlags =
|
||||
[
|
||||
"--x-includes=${libX11.dev}/include"
|
||||
"--x-libraries=${libX11.out}/lib"
|
||||
"--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"
|
||||
]
|
||||
++ lib.optionals withLLVM [
|
||||
"--enable-llvm"
|
||||
"--with-llvm=${llvm}"
|
||||
];
|
||||
configureFlags = [
|
||||
"--x-includes=${libX11.dev}/include"
|
||||
"--x-libraries=${libX11.out}/lib"
|
||||
"--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
patchShebangs autogen.sh mcs/build/start-compiler-server.sh
|
||||
@@ -92,16 +82,11 @@ stdenv.mkDerivation rec {
|
||||
# because we control pkg-config
|
||||
patches = [ ./pkgconfig-before-gac.patch ] ++ extraPatches;
|
||||
|
||||
# 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`)
|
||||
substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share"
|
||||
''
|
||||
+ lib.optionalString withLLVM ''
|
||||
substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")"
|
||||
'';
|
||||
# Patch all the necessary scripts
|
||||
preBuild = ''
|
||||
makeFlagsArray=(INSTALL=`type -tp install`)
|
||||
substituteInPlace mcs/class/corlib/System/Environment.cs --replace-fail /usr/share "$out/share"
|
||||
'';
|
||||
|
||||
# Fix mono DLLMap so it can find libX11 to run winforms apps
|
||||
# libgdiplus is correctly handled by the --with-libgdiplus configure flag
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
groff,
|
||||
cmake,
|
||||
python2,
|
||||
perl,
|
||||
libffi,
|
||||
libbfd,
|
||||
libxml2,
|
||||
valgrind,
|
||||
ncurses,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "llvm";
|
||||
version = "3.6-mono-2017-02-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mono";
|
||||
repo = "llvm";
|
||||
rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3";
|
||||
sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
perl
|
||||
groff
|
||||
libxml2
|
||||
python2
|
||||
libffi
|
||||
] ++ lib.optional stdenv.hostPlatform.isLinux valgrind;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ncurses
|
||||
zlib
|
||||
];
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
ln -sv $PWD/lib $out
|
||||
'';
|
||||
postBuild = "rm -fR $out";
|
||||
|
||||
cmakeFlags =
|
||||
with stdenv;
|
||||
[
|
||||
"-DLLVM_ENABLE_FFI=ON"
|
||||
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
||||
]
|
||||
++ lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
|
||||
homepage = "http://llvm.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user