Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions pkgs/development/compilers/mono/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
perl,
libgdiplus,
libX11,
callPackage,
ncurses,
zlib,
bash,
withLLVM ? false,
cacert,
Foundation,
libobjc,
Expand All @@ -32,9 +30,6 @@
env ? { },
}:

let
llvm = callPackage ./llvm.nix { };
in
stdenv.mkDerivation rec {
pname = "mono";
inherit version env;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
64 changes: 0 additions & 64 deletions pkgs/development/compilers/mono/llvm.nix

This file was deleted.