From 9790094f23f199da3e849df659d6151d8d9fa171 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Sat, 23 Jan 2016 21:49:50 -0600 Subject: [PATCH 1/2] libgdiplus: build on darwin --- pkgs/development/libraries/libgdiplus/default.nix | 5 +++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix index 56bc72acff02..60995046982f 100644 --- a/pkgs/development/libraries/libgdiplus/default.nix +++ b/pkgs/development/libraries/libgdiplus/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, cairo, fontconfig +{ stdenv, fetchurl, pkgconfig, glib, cairo, Carbon, fontconfig , libtiff, giflib, libungif, libjpeg, libpng, monoDLLFixer , libXrender, libexif }: @@ -25,5 +25,6 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig glib cairo fontconfig libtiff giflib libungif libjpeg libpng libXrender libexif - ]; + ] + ++ stdenv.lib.optional stdenv.isDarwin Carbon; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c283e4acb10..7801abec0483 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7267,7 +7267,9 @@ let libgcrypt_1_5 = callPackage ../development/libraries/libgcrypt/1.5.nix { }; - libgdiplus = callPackage ../development/libraries/libgdiplus { }; + libgdiplus = callPackage ../development/libraries/libgdiplus { + inherit (darwin.apple_sdk.frameworks) Carbon; + }; libgksu = callPackage ../development/libraries/libgksu { }; From 1d20ec0ff9b8b87a9ac66ce587cc45b2f9d884a3 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Sun, 24 Jan 2016 23:21:07 -0600 Subject: [PATCH 2/2] mono: build on darwin --- pkgs/development/compilers/mono/default.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix index a7a4d8da4edc..940089cafe92 100644 --- a/pkgs/development/compilers/mono/default.nix +++ b/pkgs/development/compilers/mono/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert }: +{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc }: let llvm = callPackage ./llvm.nix { }; @@ -14,10 +14,12 @@ stdenv.mkDerivation rec { buildInputs = [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib - ]; + ] + ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]); + propagatedBuildInputs = [glib]; - NIX_LDFLAGS = "-lgcc_s" ; + NIX_LDFLAGS = if stdenv.isDarwin then "" else "-lgcc_s" ; # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723 dontDisableStatic = true; @@ -68,7 +70,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://mono-project.com/; description = "Cross platform, open source .NET development framework"; - platforms = with stdenv.lib.platforms; linux; + platforms = with stdenv.lib.platforms; darwin ++ linux; maintainers = with stdenv.lib.maintainers; [ viric thoughtpolice obadz ]; license = stdenv.lib.licenses.free; # Combination of LGPL/X11/GPL ? }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7801abec0483..d354e635804d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4369,7 +4369,10 @@ let mlton = callPackage ../development/compilers/mlton { }; - mono = callPackage ../development/compilers/mono {}; + mono = callPackage ../development/compilers/mono { + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) Foundation; + }; monoDLLFixer = callPackage ../build-support/mono-dll-fixer { };