diff --git a/pkgs/development/compilers/mono/4.6.nix b/pkgs/development/compilers/mono/4.6.nix deleted file mode 100644 index 5ccdadc2878..00000000000 --- a/pkgs/development/compilers/mono/4.6.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ callPackage, Foundation, libobjc }: - -callPackage ./generic.nix (rec { - inherit Foundation libobjc; - version = "4.6.2.16"; - sha256 = "190f7kcrm1y5x61s1xwdmjnwc3czsg50s3mml4xmix7byh3x2rc9"; - enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65617511 - meta.knownVulnerabilities = [ "CVE-2018-1002208" ]; -}) diff --git a/pkgs/development/compilers/mono/4.8.nix b/pkgs/development/compilers/mono/4.nix similarity index 86% rename from pkgs/development/compilers/mono/4.8.nix rename to pkgs/development/compilers/mono/4.nix index f445127c0da..3c748e2dff7 100644 --- a/pkgs/development/compilers/mono/4.8.nix +++ b/pkgs/development/compilers/mono/4.nix @@ -1,6 +1,6 @@ { callPackage, Foundation, libobjc }: -callPackage ./generic-cmake.nix (rec { +callPackage ./generic.nix (rec { inherit Foundation libobjc; version = "4.8.1.0"; sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq"; diff --git a/pkgs/development/compilers/mono/5.0.nix b/pkgs/development/compilers/mono/5.0.nix deleted file mode 100644 index 53820c97b1b..00000000000 --- a/pkgs/development/compilers/mono/5.0.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage, Foundation, libobjc }: - -callPackage ./generic-cmake.nix (rec { - inherit Foundation libobjc; - version = "5.0.1.1"; - sha256 = "064pgsmanpybpbhpam9jv9n8aicx6mlyb7a91yzh3kcksmqsxmj8"; - enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65820147 -}) diff --git a/pkgs/development/compilers/mono/5.14.nix b/pkgs/development/compilers/mono/5.14.nix deleted file mode 100644 index dcf587a5fa4..00000000000 --- a/pkgs/development/compilers/mono/5.14.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage, Foundation, libobjc }: - -callPackage ./generic-cmake.nix (rec { - inherit Foundation libobjc; - version = "5.14.0.177"; - sha256 = "164l30fkvfgs1rh663h7dnm1yp7425bi9x2lh2y6zml8h4pgmxfl"; - enableParallelBuilding = false; -}) diff --git a/pkgs/development/compilers/mono/5.4.nix b/pkgs/development/compilers/mono/5.4.nix deleted file mode 100644 index acebb4beef6..00000000000 --- a/pkgs/development/compilers/mono/5.4.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage, Foundation, libobjc }: - -callPackage ./generic-cmake.nix (rec { - inherit Foundation libobjc; - version = "5.4.1.6"; - sha256 = "1pv5lmyxjr8z9s17jx19850k43ylzqlbzsgr5jxj1knmkbza1zdx"; - enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65820147 -}) diff --git a/pkgs/development/compilers/mono/5.8.nix b/pkgs/development/compilers/mono/5.8.nix deleted file mode 100644 index 7b5008fd04c..00000000000 --- a/pkgs/development/compilers/mono/5.8.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage, Foundation, libobjc }: - -callPackage ./generic-cmake.nix (rec { - inherit Foundation libobjc; - version = "5.8.0.108"; - sha256 = "177khb06dfll0pcncr84vvibni7f8m5fgb30ndgsdjk25xfcbmzc"; - enableParallelBuilding = false; -}) diff --git a/pkgs/development/compilers/mono/5.nix b/pkgs/development/compilers/mono/5.nix new file mode 100644 index 00000000000..2b987b08364 --- /dev/null +++ b/pkgs/development/compilers/mono/5.nix @@ -0,0 +1,8 @@ +{ callPackage, Foundation, libobjc }: + +callPackage ./generic.nix (rec { + inherit Foundation libobjc; + version = "5.16.0.220"; + sha256 = "1qwdmxssplfdb5rq86f1j8lskvr9dfk5c8hqz9ic09ml69r8c87l"; + enableParallelBuilding = false; +}) diff --git a/pkgs/development/compilers/mono/build-fix-llvm.patch b/pkgs/development/compilers/mono/build-fix-llvm.patch deleted file mode 100644 index 526986ad12c..00000000000 --- a/pkgs/development/compilers/mono/build-fix-llvm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt.old b/lib/CodeGen/AsmPrinter/CMakeLists.txt -index be484a6..c92ff46 100644 ---- a/lib/CodeGen/AsmPrinter/CMakeLists.txt.old -+++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt -@@ -10,6 +10,7 @@ add_llvm_library(LLVMAsmPrinter - DwarfCompileUnit.cpp - DwarfDebug.cpp - DwarfException.cpp -+ DwarfMonoException.cpp - ErlangGCPrinter.cpp - OcamlGCPrinter.cpp - Win64Exception.cpp diff --git a/pkgs/development/compilers/mono/generic-cmake.nix b/pkgs/development/compilers/mono/generic-cmake.nix deleted file mode 100644 index 12f833f5525..00000000000 --- a/pkgs/development/compilers/mono/generic-cmake.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which, enableParallelBuilding ? true }: - -let - llvm = callPackage ./llvm.nix { }; -in -stdenv.mkDerivation rec { - name = "mono-${version}"; - - src = fetchurl { - inherit sha256; - url = "https://download.mono-project.com/sources/mono/${name}.tar.bz2"; - }; - - buildInputs = - [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python autoconf libtool automake cmake which - ] - ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]); - - propagatedBuildInputs = [glib]; - - NIX_LDFLAGS = if stdenv.isDarwin then "" else "-lgcc_s" ; - - # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723 - dontDisableStatic = true; - - configureFlags = [ - "--x-includes=${libX11.dev}/include" - "--x-libraries=${libX11.out}/lib" - "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so" - ] - ++ stdenv.lib.optionals withLLVM [ - "--enable-llvm" - "--enable-llvmloaded" - "--with-llvm=${llvm}" - ]; - - configurePhase = '' - patchShebangs ./ - ./autogen.sh --prefix $out $configureFlags - ''; - - # Attempt to fix this error when running "mcs --version": - # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image - dontStrip = true; - - # 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`) - 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/\")" - ''; - - # Fix mono DLLMap so it can find libX11 to run winforms apps - # libgdiplus is correctly handled by the --with-libgdiplus configure flag - # Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive - # http://www.mono-project.com/Config_DllMap - postBuild = '' - find . -name 'config' -type f | xargs \ - sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g" - ''; - - # 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 - '' - # According to [1], gmcs is just mcs - # [1] https://github.com/mono/mono/blob/master/scripts/gmcs.in - + '' - ln -s $out/bin/mcs $out/bin/gmcs - ''; - - inherit enableParallelBuilding; - - meta = with stdenv.lib; { - homepage = http://mono-project.com/; - description = "Cross platform, open source .NET development framework"; - platforms = with platforms; darwin ++ linux; - maintainers = with maintainers; [ thoughtpolice obadz vrthra ]; - license = licenses.free; # Combination of LGPL/X11/GPL ? - }; -} diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix index 06dcfb8b393..400b040ae85 100644 --- a/pkgs/development/compilers/mono/generic.nix +++ b/pkgs/development/compilers/mono/generic.nix @@ -1,19 +1,10 @@ -{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11 -, callPackage, ncurses, zlib -, cacert, Foundation, libobjc, python - -, version, sha256 -, withLLVM ? false -, enableParallelBuilding ? true -, meta ? {} -}: +{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which, enableParallelBuilding ? true }: let llvm = callPackage ./llvm.nix { }; - name = "mono-${version}"; in -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + name = "mono-${version}"; src = fetchurl { inherit sha256; @@ -21,7 +12,7 @@ stdenv.mkDerivation { }; buildInputs = - [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python + [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python autoconf libtool automake cmake which ] ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]); @@ -32,8 +23,6 @@ stdenv.mkDerivation { # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723 dontDisableStatic = true; - # In fact I think this line does not help at all to what I - # wanted to achieve: have mono to find libgdiplus automatically configureFlags = [ "--x-includes=${libX11.dev}/include" "--x-libraries=${libX11.out}/lib" @@ -41,10 +30,14 @@ stdenv.mkDerivation { ] ++ stdenv.lib.optionals withLLVM [ "--enable-llvm" - "--enable-llvmloaded" "--with-llvm=${llvm}" ]; + configurePhase = '' + patchShebangs ./ + ./autogen.sh --prefix $out $configureFlags + ''; + # Attempt to fix this error when running "mcs --version": # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image dontStrip = true; @@ -57,19 +50,18 @@ stdenv.mkDerivation { # 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/\")" ''; - # Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps + # Fix mono DLLMap so it can find libX11 to run winforms apps + # libgdiplus is correctly handled by the --with-libgdiplus configure flag # Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive # http://www.mono-project.com/Config_DllMap postBuild = '' find . -name 'config' -type f | xargs \ - sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g" \ - -e "s@/.*libgdiplus.so@${libgdiplus}/lib/libgdiplus.so@g" \ + sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g" ''; # Without this, any Mono application attempting to open an SSL connection will throw with @@ -87,11 +79,11 @@ stdenv.mkDerivation { inherit enableParallelBuilding; - meta = { + meta = with stdenv.lib; { homepage = http://mono-project.com/; description = "Cross platform, open source .NET development framework"; - platforms = stdenv.lib.platforms.x86; - maintainers = with stdenv.lib.maintainers; [ thoughtpolice obadz vrthra ]; - license = stdenv.lib.licenses.free; # Combination of LGPL/X11/GPL ? - } // meta; + platforms = with platforms; darwin ++ linux; + maintainers = with maintainers; [ thoughtpolice obadz vrthra ]; + license = licenses.free; # Combination of LGPL/X11/GPL ? + }; } diff --git a/pkgs/development/compilers/mono/llvm.nix b/pkgs/development/compilers/mono/llvm.nix index 8e9dcc1dbcb..616ec420d2d 100644 --- a/pkgs/development/compilers/mono/llvm.nix +++ b/pkgs/development/compilers/mono/llvm.nix @@ -1,9 +1,10 @@ { stdenv -, fetchurl -, perl +, lib +, fetchFromGitHub , groff , cmake -, python +, python2 +, perl , libffi , libbfd , libxml2 @@ -14,22 +15,16 @@ stdenv.mkDerivation rec { name = "llvm-${version}"; - version = "3.4svn-mono-f9b1a74368"; - src = fetchurl { - # from the HEAD of the 'mono3' branch - url = "https://github.com/mono/llvm/archive/f9b1a74368ec299fc04c4cfef4b5aa0992b7b806.tar.gz"; - name = "${name}.tar.gz"; - sha256 = "1bbkx4p5zdnk3nbdd5jxvbwqx8cdq8z1n1nhf639i98mggs0zhdg"; + version = "3.6-mono-2017-02-15"; + + src = fetchFromGitHub { + owner = "mono"; + repo = "llvm"; + rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3"; + sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7"; }; - patches = [ ./build-fix-llvm.patch ]; - unpackPhase = '' - unpackFile ${src} - mv llvm-* llvm - sourceRoot=$PWD/llvm - ''; - - buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind; + buildInputs = [ perl groff cmake libxml2 python2 libffi ] ++ lib.optional stdenv.isLinux valgrind; propagatedBuildInputs = [ ncurses zlib ]; @@ -43,7 +38,6 @@ stdenv.mkDerivation rec { cmakeFlags = with stdenv; [ "-DLLVM_ENABLE_FFI=ON" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - "-DCMAKE_CXX_FLAGS=-std=c++11" ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON"; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch b/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch deleted file mode 100644 index 1b9c59402bf..00000000000 --- a/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Naur mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets ---- mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old 2017-04-24 23:45:18.348116305 +0200 -+++ mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets 2017-04-24 23:45:11.407051755 +0200 -@@ -167,8 +167,8 @@ - $(ReferencePath); - @(AdditionalReferencePath); - {HintPathFromItem}; -- {TargetFrameworkDirectory}; - {PkgConfig}; -+ {TargetFrameworkDirectory}; - {GAC}; - {RawFileName}; - $(OutDir) -diff -Naur mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets ---- mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old 2017-04-24 23:49:53.019616196 +0200 -+++ mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets 2017-04-24 23:50:05.709729585 +0200 -@@ -232,8 +232,8 @@ - $(ReferencePath); - @(AdditionalReferencePath); - {HintPathFromItem}; -- {TargetFrameworkDirectory}; - {PkgConfig}; -+ {TargetFrameworkDirectory}; - {GAC}; - {RawFileName}; - $(OutDir) -diff -Naur mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets ---- mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old 2017-04-24 23:52:33.200037047 +0200 -+++ mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets 2017-04-24 23:52:43.281125802 +0200 -@@ -139,8 +139,8 @@ - $(ReferencePath); - @(AdditionalReferencePath); - {HintPathFromItem}; -- {TargetFrameworkDirectory}; - {PkgConfig}; -+ {TargetFrameworkDirectory}; - {GAC}; - {RawFileName}; - $(OutDir) -diff -Naur mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets ---- mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old 2017-04-24 23:54:02.585821594 +0200 -+++ mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets 2017-04-24 23:54:09.313880438 +0200 -@@ -234,8 +234,8 @@ - $(ReferencePath); - @(AdditionalReferencePath); - {HintPathFromItem}; -- {TargetFrameworkDirectory}; - {PkgConfig}; -+ {TargetFrameworkDirectory}; - {GAC}; - {RawFileName}; - $(OutDir) -diff -Naur mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets ---- mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old 2017-04-24 23:55:46.244895155 +0200 -+++ mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets 2017-04-24 23:55:51.998961342 +0200 -@@ -232,8 +232,8 @@ - $(ReferencePath); - @(AdditionalReferencePath); - {HintPathFromItem}; -- {TargetFrameworkDirectory}; - {PkgConfig}; -+ {TargetFrameworkDirectory}; - {GAC}; - {RawFileName}; - $(OutDir) diff --git a/pkgs/development/libraries/dbus-sharp/default.nix b/pkgs/development/libraries/dbus-sharp/default.nix index 2704ef2de9f..14db5baea3f 100644 --- a/pkgs/development/libraries/dbus-sharp/default.nix +++ b/pkgs/development/libraries/dbus-sharp/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchFromGitHub, pkgconfig, mono48, autoreconfHook }: +{stdenv, fetchFromGitHub, pkgconfig, mono4, autoreconfHook }: stdenv.mkDerivation rec { name = "dbus-sharp-${version}"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # Use msbuild when https://github.com/NixOS/nixpkgs/pull/43680 is merged # See: https://github.com/NixOS/nixpkgs/pull/46060 - buildInputs = [ mono48 ]; + buildInputs = [ mono4 ]; dontStrip = true; diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix index d54f9203d23..70353d68ca7 100644 --- a/pkgs/development/libraries/libgdiplus/default.nix +++ b/pkgs/development/libraries/libgdiplus/default.nix @@ -1,31 +1,40 @@ -{ stdenv, fetchurl, pkgconfig, glib, cairo, Carbon, fontconfig +{ stdenv, fetchFromGitHub, pkgconfig, glib, cairo, Carbon, fontconfig , libtiff, giflib, libjpeg, libpng -, libXrender, libexif }: +, libXrender, libexif, autoreconfHook, fetchpatch }: stdenv.mkDerivation rec { - name = "libgdiplus-2.10.9"; + name = "libgdiplus-5.6"; - src = fetchurl { - url = "https://download.mono-project.com/sources/libgdiplus/${name}.tar.bz2"; - sha256 = "0klnbly2q0yx5p0l5z8da9lhqsjj9xqj06kdw2v7rnms4z1vdpkd"; + src = fetchFromGitHub { + owner = "mono"; + repo = "libgdiplus"; + rev = "5.6"; + sha256 = "11xr84kng74j3pd8sx74q80a71k6dw0a502qgibcxlyqh666lfb7"; }; NIX_LDFLAGS = "-lgif"; - patches = - [ (fetchurl { - url = "https://raw.github.com/MagicGroup/MagicSpecLib/master/libgdiplus/libgdiplus-2.10.1-libpng15.patch"; - sha256 = "130r0jm065pjvbz5dkx96w37vj1wqc8fakmi2znribs14g0bl65f"; - }) - ./giflib.patch - ]; - - patchFlags = "-p0"; + patches = [ # Series of patches cherry-picked from master, all fixes various sigsegv (or required by other patch) + (fetchpatch { + url = "https://github.com/mono/libgdiplus/commit/d33a2580a94701ff33abe28c22881d6173be57d0.patch"; + sha256 = "0rr54jylscn4icqjprqhwrncyr92r0d7kmfrrq3myskplpqv1c11"; + }) + (fetchpatch { + url ="https://github.com/mono/libgdiplus/commit/aa6aa53906935572f52f519fe4ab9ebedc051d08.patch"; + sha256 = "1wg0avm8qv5cb4vk80baflfzszm6q7ydhn89c3h6kq68hg6zsf1f"; + }) + (fetchpatch { + url = "https://github.com/mono/libgdiplus/commit/81e45a1d5a3ac3cf035bcc3fabb2859818b6cc04.patch"; + sha256 = "07wmc88cd1lqifs5x6npryni65jyy9gi8lgr2i1lb7v0fhvlyswg"; + }) + ]; hardeningDisable = [ "format" ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = - [ pkgconfig glib cairo fontconfig libtiff giflib + [ glib cairo fontconfig libtiff giflib libjpeg libpng libXrender libexif ] ++ stdenv.lib.optional stdenv.isDarwin Carbon; @@ -34,6 +43,10 @@ stdenv.mkDerivation rec { ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so ''; + checkPhase = '' + make check -w + ''; + meta = with stdenv.lib; { description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems"; homepage = https://www.mono-project.com/docs/gui/libgdiplus/; diff --git a/pkgs/development/libraries/libgdiplus/giflib.patch b/pkgs/development/libraries/libgdiplus/giflib.patch deleted file mode 100644 index 7b90d9863fd..00000000000 --- a/pkgs/development/libraries/libgdiplus/giflib.patch +++ /dev/null @@ -1,143 +0,0 @@ -diff -Naur libgdiplus-2.10.9-orig/src/gifcodec.c libgdiplus-2.10.9/src/gifcodec.c ---- src/gifcodec.c -+++ src/gifcodec.c -@@ -39,8 +39,10 @@ - - #include "gifcodec.h" - -+#if GIFLIB_MAJOR < 5 - /* giflib declares this incorrectly as EgifOpen */ - extern GifFileType *EGifOpen(void *userData, OutputFunc writeFunc); -+#endif - - /* Data structure used for callback */ - typedef struct -@@ -105,7 +107,7 @@ - */ - - static int --AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[]) -+AddExtensionBlockMono(SavedImage *New, int Len, int func, BYTE ExtData[]) - { - ExtensionBlock *ep; - -@@ -129,7 +131,7 @@ - - if (ExtData) { - memcpy(ep->Bytes, ExtData, Len); -- ep->Function = New->Function; -+ ep->Function = func; - } - - return (GIF_OK); -@@ -232,20 +234,20 @@ - } - - case EXTENSION_RECORD_TYPE: { -- if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) { -+ int func; -+ if (DGifGetExtension(GifFile, &func, &ExtData) == GIF_ERROR) { - return (GIF_ERROR); - } - - while (ExtData != NULL) { - /* Create an extension block with our data */ -- if (AddExtensionBlockMono(&temp_save, ExtData[0], &ExtData[1]) == GIF_ERROR) { -+ if (AddExtensionBlockMono(&temp_save, func, ExtData[0], &ExtData[1]) == GIF_ERROR) { - return (GIF_ERROR); - } - - if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) { - return (GIF_ERROR); - } -- temp_save.Function = 0; - } - break; - } -@@ -303,12 +305,19 @@ - result = NULL; - loop_counter = FALSE; - -+#if GIFLIB_MAJOR < 5 - if (from_file) { - gif = DGifOpen(stream, &gdip_gif_fileinputfunc); - } else { - gif = DGifOpen (stream, &gdip_gif_inputfunc); - } -- -+#else -+ if (from_file) -+ gif = DGifOpen(stream, &gdip_gif_fileinputfunc, NULL); -+ else -+ gif = DGifOpen(stream, &gdip_gif_inputfunc, NULL); -+#endif -+ - if (gif == NULL) { - goto error; - } -@@ -581,7 +590,7 @@ - } - - FreeExtensionMono(&global_extensions); -- DGifCloseFile (gif); -+ DGifCloseFile (gif, NULL); - - *image = result; - return Ok; -@@ -597,7 +606,7 @@ - - if (gif != NULL) { - FreeExtensionMono (&global_extensions); -- DGifCloseFile (gif); -+ DGifCloseFile (gif, NULL); - } - - *image = NULL; -@@ -660,11 +669,22 @@ - return InvalidParameter; - } - -+#if GIFLIB_MAJOR < 5 - if (from_file) { - fp = EGifOpenFileName (stream, 0); - } else { - fp = EGifOpen (stream, gdip_gif_outputfunc); - } -+#else -+ if (from_file) -+ fp = EGifOpenFileName (stream, 0, NULL); -+ else -+ fp = EGifOpen (stream, gdip_gif_outputfunc, NULL); -+#define MakeMapObject GifMakeMapObject -+#define FreeMapObject GifFreeMapObject -+#define QuantizeBuffer GifQuantizeBuffer -+#define BitSize GifBitSize -+#endif - - if (!fp) { - return FileNotFound; -@@ -848,8 +868,15 @@ - Buffer[0] = 1; - Buffer[1] = ptr[0]; - Buffer[2] = ptr[1]; -+#if GIFLIB_MAJOR < 5 - EGifPutExtensionFirst(fp, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0"); - EGifPutExtensionLast(fp, APPLICATION_EXT_FUNC_CODE, 3, Buffer); -+#else -+ EGifPutExtensionLeader(fp, APPLICATION_EXT_FUNC_CODE); -+ EGifPutExtensionBlock(fp, 11, "NETSCAPE2.0"); -+ EGifPutExtensionBlock(fp, 3, Buffer); -+ EGifPutExtensionTrailer(fp); -+#endif - } - } - -@@ -923,7 +950,7 @@ - } - } - -- EGifCloseFile (fp); -+ EGifCloseFile (fp, NULL); - - return Ok; - diff --git a/pkgs/development/libraries/mono-addins/default.nix b/pkgs/development/libraries/mono-addins/default.nix index ca72557242f..43311c29659 100644 --- a/pkgs/development/libraries/mono-addins/default.nix +++ b/pkgs/development/libraries/mono-addins/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, mono48, gtk-sharp-2_0 }: +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, mono4, gtk-sharp-2_0 }: stdenv.mkDerivation rec { name = "mono-addins-${version}"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig autoreconfHook ]; # Use msbuild when https://github.com/NixOS/nixpkgs/pull/43680 is merged - buildInputs = [ mono48 gtk-sharp-2_0 ]; + buildInputs = [ mono4 gtk-sharp-2_0 ]; dontStrip = true; diff --git a/pkgs/servers/foundationdb/default.nix b/pkgs/servers/foundationdb/default.nix index 7e4babbb979..5d8e347de99 100644 --- a/pkgs/servers/foundationdb/default.nix +++ b/pkgs/servers/foundationdb/default.nix @@ -2,7 +2,7 @@ , lib, fetchurl, fetchpatch, fetchFromGitHub , which, findutils, m4, gawk -, python, openjdk, mono58, libressl +, python, openjdk, mono, libressl }: let @@ -50,7 +50,7 @@ let inherit rev sha256; }; - nativeBuildInputs = [ python openjdk gawk which m4 findutils mono58 ]; + nativeBuildInputs = [ python openjdk gawk which m4 findutils mono ]; buildInputs = [ libressl boost ]; patches = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7a4b579367..e18a8d89518 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3538,9 +3538,7 @@ in jaaa = callPackage ../applications/audio/jaaa { }; - jackett = callPackage ../servers/jackett { - mono = mono514; - }; + jackett = callPackage ../servers/jackett { }; jade = callPackage ../tools/text/sgml/jade { }; @@ -7042,9 +7040,7 @@ in fsharp = callPackage ../development/compilers/fsharp { }; - fsharp41 = callPackage ../development/compilers/fsharp41 { - mono = mono46; - }; + fsharp41 = callPackage ../development/compilers/fsharp41 { mono = mono4; }; fstar = callPackage ../development/compilers/fstar { }; @@ -7357,36 +7353,14 @@ in mlton = mlton20180207; - mono = mono5; - mono5 = mono58; - mono4 = mono48; + mono = mono5; - mono46 = lowPrio (callPackage ../development/compilers/mono/4.6.nix { + mono4 = lowPrio (callPackage ../development/compilers/mono/4.nix { inherit (darwin) libobjc; inherit (darwin.apple_sdk.frameworks) Foundation; }); - mono48 = lowPrio (callPackage ../development/compilers/mono/4.8.nix { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.frameworks) Foundation; - }); - - mono50 = lowPrio (callPackage ../development/compilers/mono/5.0.nix { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.frameworks) Foundation; - }); - - mono54 = lowPrio (callPackage ../development/compilers/mono/5.4.nix { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.frameworks) Foundation; - }); - - mono58 = callPackage ../development/compilers/mono/5.8.nix { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.frameworks) Foundation; - }; - - mono514 = callPackage ../development/compilers/mono/5.14.nix { + mono5 = callPackage ../development/compilers/mono/5.nix { inherit (darwin) libobjc; inherit (darwin.apple_sdk.frameworks) Foundation; }; @@ -13516,7 +13490,7 @@ in elasticmq = callPackage ../servers/elasticmq { }; eventstore = callPackage ../servers/nosql/eventstore { - mono = mono46; + mono = mono4; v8 = v8_6_x; }; @@ -16890,9 +16864,7 @@ in inherit (gnome3) evince; evolution-data-server = gnome3.evolution-data-server; - keepass = callPackage ../applications/misc/keepass { - buildDotnetPackage = buildDotnetPackage.override { mono = mono54; }; - }; + keepass = callPackage ../applications/misc/keepass { }; keepass-keeagent = callPackage ../applications/misc/keepass-plugins/keeagent { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 67cd6cf1948..b8fbcaa194c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3725,7 +3725,7 @@ in { pythonnet = callPackage ../development/python-modules/pythonnet { # `mono >= 4.6` required to prevent crashes encountered with earlier versions. - mono = pkgs.mono46; + mono = pkgs.mono4; }; pytz = callPackage ../development/python-modules/pytz { };