From 6bdecbf1ba4121c09ab120999e9f8cd3ca32f482 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 9 Jan 2017 23:24:17 +0100 Subject: [PATCH 1/3] graphviz: add darwin frameworks --- pkgs/tools/graphics/graphviz/2.32.nix | 3 ++- pkgs/tools/graphics/graphviz/default.nix | 5 +++-- pkgs/top-level/all-packages.nix | 10 +++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/graphics/graphviz/2.32.nix b/pkgs/tools/graphics/graphviz/2.32.nix index a09d60f788c..c4a0981dbb3 100644 --- a/pkgs/tools/graphics/graphviz/2.32.nix +++ b/pkgs/tools/graphics/graphviz/2.32.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat, libXaw , yacc, libtool, fontconfig, pango, gd, xorg, gts, gettext, cairo +, ApplicationServices }: stdenv.mkDerivation rec { @@ -15,7 +16,7 @@ stdenv.mkDerivation rec { [ pkgconfig libpng libjpeg expat libXaw yacc libtool fontconfig pango gd gts ] ++ stdenv.lib.optionals (xorg != null) [ xorg.xlibsWrapper xorg.libXrender ] - ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; + ++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices gettext ]; CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo.dev}/include/cairo"; diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index e815cded09a..b0ccc5428bb 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, pkgconfig, libpng, libjpeg, expat , yacc, libtool, fontconfig, pango, gd, xorg, gts, libdevil, gettext, cairo , flex +, ApplicationServices }: stdenv.mkDerivation rec { @@ -20,9 +21,9 @@ stdenv.mkDerivation rec { [ pkgconfig libpng libjpeg expat yacc libtool fontconfig gd gts libdevil flex pango ] ++ stdenv.lib.optionals (xorg != null) (with xorg; [ xlibsWrapper libXrender libXaw libXpm ]) - ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") gettext; + ++ stdenv.lib.optionals (stdenv.isDarwin) [ ApplicationServices gettext ]; - CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.system == "x86_64-darwin") + CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.isDarwin) "-I${cairo.dev}/include/cairo"; configureFlags = stdenv.lib.optional (xorg == null) "--without-x"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed648b568c2..ae8ea57eb01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1988,9 +1988,11 @@ in pythonPackages = pypyPackages; }; - graphviz = callPackage ../tools/graphics/graphviz { }; + graphviz = callPackage ../tools/graphics/graphviz { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }; - graphviz-nox = callPackage ../tools/graphics/graphviz { + graphviz-nox = graphviz.override { xorg = null; libdevil = libdevil-nox; }; @@ -2005,7 +2007,9 @@ in * that do want 2.32 but not 2.0 or 2.36. Please give a day's notice for * objections before removal. The feature is libgraph. */ - graphviz_2_32 = callPackage ../tools/graphics/graphviz/2.32.nix { }; + graphviz_2_32 = callPackage ../tools/graphics/graphviz/2.32.nix { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }; grin = callPackage ../tools/text/grin { }; ripgrep = callPackage ../tools/text/ripgrep { }; From 581a5aec887fc399a44fad4f2dae322395ab13ff Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 10 Jan 2017 23:03:49 +0100 Subject: [PATCH 2/3] imagemagick: add darwin frameworks --- pkgs/applications/graphics/ImageMagick/7.0.nix | 3 ++- pkgs/applications/graphics/ImageMagick/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index 3a0771a73ef..f5c475ef93a 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, pkgconfig, libtool , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp +, ApplicationServices }: let @@ -58,7 +59,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") [ openexr librsvg openjpeg ] - ; + ++ lib.optional stdenv.isDarwin ApplicationServices; propagatedBuildInputs = [ bzip2 freetype libjpeg lcms2 ] diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index e7f0a6b11d9..3364a661e0c 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, pkgconfig, libtool , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp +, ApplicationServices }: let @@ -70,7 +71,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") [ openexr librsvg openjpeg ] - ; + ++ lib.optional stdenv.isDarwin ApplicationServices; propagatedBuildInputs = [ bzip2 freetype libjpeg lcms2 ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae8ea57eb01..7fb528c6465 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13697,7 +13697,9 @@ in ghostscript = null; }; - imagemagickBig = callPackage ../applications/graphics/ImageMagick { }; + imagemagickBig = callPackage ../applications/graphics/ImageMagick { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }; imagemagick7_light = lowPrio (imagemagick7.override { bzip2 = null; @@ -13723,7 +13725,9 @@ in ghostscript = null; }); - imagemagick7Big = lowPrio (callPackage ../applications/graphics/ImageMagick/7.0.nix { }); + imagemagick7Big = lowPrio (callPackage ../applications/graphics/ImageMagick/7.0.nix { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }); # Impressive, formerly known as "KeyJNote". impressive = callPackage ../applications/office/impressive { }; From cb061ef4f2faf05e226e72da323c5d3c310c25bb Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 10 Jan 2017 23:15:05 +0100 Subject: [PATCH 3/3] gst_plugins_base: add darwin frameworks --- .../libraries/gstreamer/legacy/gst-plugins-base/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix index 0e1e3c4897e..5b2ba728f3a 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-base/default.nix @@ -1,6 +1,7 @@ { fetchurl, stdenv, pkgconfig, python, gstreamer, xorg, alsaLib, cdparanoia , libogg, libtheora, libvorbis, freetype, pango, liboil, glib, cairo, orc , libintlOrEmpty +, ApplicationServices , # Whether to build no plugins that have external dependencies # (except the ALSA plugin). minimalDeps ? false @@ -36,7 +37,8 @@ stdenv.mkDerivation rec { liboil ] # can't build cdparanoia on darwin ++ stdenv.lib.optional (!minimalDeps && !stdenv.isDarwin) cdparanoia - ++ libintlOrEmpty; + ++ libintlOrEmpty + ++ stdenv.lib.optional stdenv.isDarwin ApplicationServices; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fb528c6465..15796fd0356 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7386,7 +7386,9 @@ in bison = bison2; }; - gst_plugins_base = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-base {}; + gst_plugins_base = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-base { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }; gst_plugins_good = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-good {};