From dad3714ec16c96b4512d5ebdff84f88867dfb291 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 15:06:15 -0500 Subject: [PATCH 01/12] live555: supports darwin --- .../development/libraries/live555/default.nix | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix index 1479f7b6153b..69c16878fdf5 100644 --- a/pkgs/development/libraries/live555/default.nix +++ b/pkgs/development/libraries/live555/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, lib, darwin }: # Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD let @@ -12,19 +12,22 @@ stdenv.mkDerivation { sha256 = "0zi47asv1qmb09g321m02q684i3c90vci0mgkdh1mlmx2rbg1d1d"; }; - postPatch = "sed 's,/bin/rm,rm,g' -i genMakefiles" - + stdenv.lib.optionalString (stdenv ? glibc) '' - + postPatch = '' + sed 's,/bin/rm,rm,g' -i genMakefiles + sed \ + -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \ + -i config.linux + '' + stdenv.lib.optionalString (stdenv ? glibc) '' substituteInPlace liveMedia/include/Locale.hh \ --replace '' '' ''; configurePhase = '' - sed \ - -e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \ - -i config.linux - - ./genMakefiles linux + ./genMakefiles ${{ + x86_64-darwin = "macosx"; + i686-linux = "linux"; + x86_64-linux = "linux-64bit"; + }.${stdenv.system}} ''; installPhase = '' @@ -35,10 +38,12 @@ stdenv.mkDerivation { done ''; - meta = with stdenv.lib; { + nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools; + + meta = with lib; { description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)"; homepage = http://www.live555.com/liveMedia/; license = licenses.lgpl21Plus; - platforms = platforms.linux; + platforms = platforms.unix; }; } From db6cc5623945c6594475303a838accce41a9729a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 15:08:12 -0500 Subject: [PATCH 02/12] libmtp: supports darwin --- pkgs/development/libraries/libmtp/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libmtp/default.nix b/pkgs/development/libraries/libmtp/default.nix index 88ef55715a7c..c3061626a6ae 100644 --- a/pkgs/development/libraries/libmtp/default.nix +++ b/pkgs/development/libraries/libmtp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libusb1 }: +{ stdenv, fetchurl, pkgconfig, libusb1, libiconv }: stdenv.mkDerivation rec { name = "libmtp-1.1.15"; @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; + buildInputs = [ libiconv ]; propagatedBuildInputs = [ libusb1 ]; nativeBuildInputs = [ pkgconfig ]; @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { in the form of a library suitable primarily for POSIX compliant operating systems. We implement MTP Basic, the stuff proposed for standardization. ''; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; maintainers = [ ]; }; } From 9c406d2ac8574ea03ba68db9b843c36ac43e3289 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 15:09:07 -0500 Subject: [PATCH 03/12] libdvdnav: supports Darwin --- pkgs/development/libraries/libdvdnav/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libdvdnav/default.nix b/pkgs/development/libraries/libdvdnav/default.nix index 42321b2f866a..b0dfd1e8fc12 100644 --- a/pkgs/development/libraries/libdvdnav/default.nix +++ b/pkgs/development/libraries/libdvdnav/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { description = "A library that implements DVD navigation features such as DVD menus"; license = stdenv.lib.licenses.gpl2; maintainers = [ stdenv.lib.maintainers.wmertens ]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; passthru = { inherit libdvdread; }; From 00bf1150473dedb02f22696450b250e04875faab Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 15:16:12 -0500 Subject: [PATCH 04/12] schroedinger: add Darwin patch --- .../libraries/schroedinger/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/schroedinger/default.nix b/pkgs/development/libraries/schroedinger/default.nix index 2309719c2bdc..167fe4190764 100644 --- a/pkgs/development/libraries/schroedinger/default.nix +++ b/pkgs/development/libraries/schroedinger/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, orc, pkgconfig }: +{ stdenv, fetchurl, orc, pkgconfig, fetchpatch, autoreconfHook }: stdenv.mkDerivation { name = "schroedinger-1.0.11"; @@ -13,15 +13,23 @@ stdenv.mkDerivation { outputs = [ "out" "dev" "devdoc" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig autoreconfHook ]; buildInputs = [ orc ]; - doCheck = true; + doCheck = (!stdenv.isDarwin); + + patchFlags = "-p0"; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/macports/macports-ports/master/multimedia/schroedinger/files/patch-testsuite-Makefile.am.diff"; + sha256 = "0cc8ymvgjgwy7ghca2dd8m8pxpinf27s2i8krf2m3fzv2ckq09v3"; + }) + ]; meta = with stdenv.lib; { homepage = http://diracvideo.org/; maintainers = [ maintainers.spwhitt ]; license = [ licenses.mpl11 licenses.lgpl2 licenses.mit ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From 734b13a817376f0b96f2e1e7a71034bdbcacbd7c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 18:35:54 -0500 Subject: [PATCH 05/12] gst-plugins: fix on Darwin --- pkgs/development/libraries/gstreamer/bad/default.nix | 1 + pkgs/development/libraries/gstreamer/good/default.nix | 5 +++++ pkgs/development/libraries/gstreamer/ugly/default.nix | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 73cbaa0f8070..8ebd70921135 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { ''; license = licenses.lgpl2Plus; platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; }; preConfigure = '' diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 5c10221b27d7..21376ce79c1c 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -6,6 +6,7 @@ , libsoup, libpulseaudio, libintl , darwin, lame, mpg123, twolame , gtkSupport ? false, gtk3 ? null +, ncurses }: assert gtkSupport -> gtk3 != null; @@ -26,6 +27,7 @@ stdenv.mkDerivation rec { ''; license = licenses.lgpl2Plus; platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; }; src = fetchurl { @@ -39,11 +41,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig python meson ninja gettext ]; + NIX_LDFLAGS = "-lncurses"; + buildInputs = [ gst-plugins-base orc bzip2 libdv libvpx speex flac taglib cairo gdk_pixbuf aalib libcaca libsoup libshout lame mpg123 twolame libintl + ncurses ] ++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ]; diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index a5449abb9f7d..004bb0715f26 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -1,13 +1,14 @@ { stdenv, fetchurl, meson, ninja, pkgconfig, python , gst-plugins-base, orc, gettext , a52dec, libcdio, libdvdread -, libmad, libmpeg2, x264, libintl +, libmad, libmpeg2, x264, libintl, lib +, darwin }: stdenv.mkDerivation rec { name = "gst-plugins-ugly-1.14.0"; - meta = with stdenv.lib; { + meta = with lib; { description = "Gstreamer Ugly Plugins"; homepage = "https://gstreamer.freedesktop.org"; longDescription = '' @@ -18,6 +19,7 @@ stdenv.mkDerivation rec { ''; license = licenses.lgpl2Plus; platforms = platforms.unix; + maintainers = with maintainers; [ matthewbauer ]; }; src = fetchurl { @@ -34,5 +36,6 @@ stdenv.mkDerivation rec { a52dec libcdio libdvdread libmad libmpeg2 x264 libintl - ]; + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; + [ IOKit CoreFoundation DiskArbitration ]); } From 04e13de94f1909afc4711a92cf83d5969afa0981 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 20:54:36 -0500 Subject: [PATCH 06/12] gn: fix Darwin build --- .../tools/build-managers/gn/default.nix | 139 ++++++++++++------ 1 file changed, 93 insertions(+), 46 deletions(-) diff --git a/pkgs/development/tools/build-managers/gn/default.nix b/pkgs/development/tools/build-managers/gn/default.nix index 5e7dd5214a04..bfbb2b4e3308 100644 --- a/pkgs/development/tools/build-managers/gn/default.nix +++ b/pkgs/development/tools/build-managers/gn/default.nix @@ -1,77 +1,124 @@ -{ stdenv, lib, fetchgit, fetchurl, libevent, ninja, python }: +{ stdenv, lib, fetchgit, fetchurl, fetchpatch +, libevent, ninja, python, darwin }: let depsGit = { "tools/gn" = fetchgit { url = "https://chromium.googlesource.com/chromium/src/tools/gn"; - rev = "d0c518db129975ce88ff1de26c857873b0619c4b"; - sha256 = "0l15vzmjyx6bwlz1qhn3fy7yx3qzzxr3drnkj3l0p0fmyxza52vx"; + rev = "0fa417a0d2d8484e9a5a636e3301da322f586601"; + sha256 = "0pigcl14yc4aak6q1ghfjxdz2ah4fg4m2r5y3asw2rz6mpr5y9z0"; }; "base" = fetchgit { url = "https://chromium.googlesource.com/chromium/src/base"; - rev = "bc6e3ce8ca01b894751e1f7b22b561e3ae2e7f17"; - sha256 = "1yl49v6nxbrfms52xf7fiwh7d4301m2aj744pa3hzzh989c5j6g5"; + rev = "ab1d7c3b92ce9c9bc756bdefb8338360d1a33a1e"; + sha256 = "15wis6qg9ka62k6v1vamg0bp3v5vkpapg485jsn4bbfcaqp6di0f"; }; "build" = fetchgit { url = "https://chromium.googlesource.com/chromium/src/build"; - rev = "e934a19ae908081fba13769924e4ea45a7a451ce"; - sha256 = "0jhy418vaiin7djg9zvk83f8zhasigki4442x5j7gkmgmgmyc4am"; + rev = "8d44c08a4c9997695db8098198bdd5026bc7a6f9"; + sha256 = "19sajgf55xfmvnwvy2ss7g6pyljp751cfsws30w415m6m00lmpxl"; }; "config" = fetchgit { url = "https://chromium.googlesource.com/chromium/src/build/config"; - rev = "df16c6a2c070704b0a25efe46ee9af16de1e65b3"; - sha256 = "1x18syzz1scwhd8lf448hy5lnfpq118l403x9qmwm0np318w09wg"; + rev = "14116c0cdcb9e28995ca8bb384a12e5c9dbd1dbb"; + sha256 = "04nif0lm4wcy05b7xhal023874s4r0iq067q57cgwdm72i2gml40"; }; "testing/gtest" = fetchgit { url = "https://chromium.googlesource.com/chromium/testing/gtest"; rev = "585ec31ea716f08233a815e680fc0d4699843938"; sha256 = "0csn1cza66851nmxxiw42smsm3422mx67vcyykwn0a71lcjng6rc"; }; + "third_party/apple_apsl" = fetchurl { + url = "https://chromium.googlesource.com/chromium/src/third_party/+archive/8e6ccb8c74db6dfa15dd21401ace3ac96c054cf7/apple_apsl.tar.gz"; + sha256 = "0sc7b7zdw7f9piyyijl7xq3v1fzflqlck1apwm8kvgdhkyz3l63k"; + }; }; -in - stdenv.mkDerivation rec { - name = "gn"; - version = "0.0.0.20170629"; - sourceRoot = "."; +in stdenv.mkDerivation { + name = "gn"; + version = "20180423"; + sourceRoot = "."; - unpackPhase = '' - ${lib.concatStringsSep "\n" ( - lib.mapAttrsToList (n: v: '' - mkdir -p $sourceRoot/${n} + unpackPhase = '' + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (n: v: '' + mkdir -p $sourceRoot/${n} + if [ -d ${v} ]; then cp -r ${v}/* $sourceRoot/${n} - '') depsGit)} - ''; + else + mkdir -p $sourceRoot/${n} + pushd $sourceRoot/${n} + unpackFile ${v} + popd + fi + '') depsGit)} - postPatch = '' - # Patch shebands (for sandbox build) - chmod u+w -R build - patchShebangs build + chmod u+w -R $sourceRoot + ''; - # Patch out Chromium-bundled libevent - chmod u+w tools/gn/bootstrap tools/gn/bootstrap/bootstrap.py - sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \ - tools/gn/bootstrap/bootstrap.py - ''; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/Eloston/ungoogled-chromium/master/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch"; + sha256 = "1h8jgxznm7zrxlzb4wcfx4zx4lyvfrmpd0r7cd7h0s23wn8ibb3a"; + }) + ]; - NIX_LDFLAGS = "-levent"; + postPatch = '' + # Disable libevent bootstrapping (we will provide it). + sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \ + tools/gn/bootstrap/bootstrap.py - nativeBuildInputs = [ ninja python ]; - buildInputs = [ libevent ]; + # FIXME Needed with old Apple SDKs + substituteInPlace base/mac/foundation_util.mm \ + --replace "NSArray*" "NSArray*" + substituteInPlace base/mac/sdk_forward_declarations.h \ + --replace "NSDictionary*" "NSDictionary*" \ + --replace "NSArray*" "NSArray*" \ + --replace "typedef NSString* VNImageOption NS_STRING_ENUM" "typedef NSString* VNImageOption" - buildPhase = '' - python tools/gn/bootstrap/bootstrap.py -s - ''; + # Patch shebangs (for sandbox build) + patchShebangs build + ''; - installPhase = '' - install -vD out/Release/gn "$out/bin/gn" - ''; + # FIXME again this shouldn't be necessary but I can't figure out a better way + NIX_CFLAGS_COMPILE = "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"; - meta = with stdenv.lib; { - description = "A meta-build system that generates NinjaBuild files"; - homepage = https://chromium.googlesource.com/chromium/src/tools/gn; - license = licenses.bsd3; - platforms = platforms.linux; - maintainers = [ maintainers.stesie ]; - }; - } + NIX_LDFLAGS = "-levent"; + + nativeBuildInputs = [ ninja python ]; + buildInputs = [ libevent ] + + # FIXME These dependencies shouldn't be needed but can't find a way + # around it. Chromium pulls this in while bootstrapping GN. + ++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + libobjc + cctools + + # frameworks + ApplicationServices + Foundation + AppKit + ImageCaptureCore + CoreBluetooth + IOBluetooth + CoreWLAN + Quartz + Cocoa + ]); + + buildPhase = '' + python tools/gn/bootstrap/bootstrap.py -s + ''; + + installPhase = '' + install -vD out/Release/gn "$out/bin/gn" + ''; + + meta = with lib; { + description = "A meta-build system that generates NinjaBuild files"; + homepage = https://chromium.googlesource.com/chromium/src/tools/gn; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ stesie matthewbauer ]; + }; +} From a276d5160cc4b307d97261b419e183fb3a2214aa Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 22:38:38 -0500 Subject: [PATCH 07/12] inkscape: fix on Darwin Fixes #39175 --- .../graphics/inkscape/default.nix | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 47452eb43e88..b5d11d912a5e 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -2,9 +2,15 @@ , libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2 , glibmm, libsigcxx, lcms, boost, gettext, makeWrapper , gsl, python2, poppler, imagemagick, libwpg, librevenge -, libvisio, libcdr, libexif, potrace, cmake +, libvisio, libcdr, libexif, potrace, autoreconfHook +, intltool +, lib }: +# Note that originally this Nix expression used CMake to build but +# this led to errors on MacOS of "Too many arguments". Inkscape +# supports autoconf and we will use this for now on. + let python2Env = python2.withPackages(ps: with ps; [ numpy lxml ]); in @@ -17,12 +23,6 @@ stdenv.mkDerivation rec { sha256 = "1chng2yw8dsjxc9gf92aqv7plj11cav8ax321wmakmv5bb09cch6"; }; - unpackPhase = '' - cp $src ${name}.tar.bz2 - tar xvjf ${name}.tar.bz2 > /dev/null - cd ${name} - ''; - postPatch = '' patchShebangs share/extensions patchShebangs fix-roff-punct @@ -33,25 +33,26 @@ stdenv.mkDerivation rec { --replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"' ''; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig autoreconfHook intltool ]; buildInputs = [ perl perlXMLParser libXft libpng zlib popt boehmgc libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext makeWrapper gsl poppler imagemagick libwpg librevenge - libvisio libcdr libexif potrace cmake python2Env + libvisio libcdr libexif potrace python2Env ]; enableParallelBuilding = true; + preConfigure = '' + intltoolize -f + ''; + postInstall = '' # Make sure PyXML modules can be found at run-time. rm "$out/share/icons/hicolor/icon-theme.cache" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape - install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview ''; - meta = with stdenv.lib; { + meta = with lib; { license = "GPL"; homepage = https://www.inkscape.org; description = "Vector graphics editor"; @@ -62,5 +63,6 @@ stdenv.mkDerivation rec { If you want to import .eps files install ps2edit. ''; + maintainers = with maintainters; [ matthewbauer ]; }; } From 7587f9804f23f6ab9973f8735b10cd0bb87e0c7d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 22:58:45 -0500 Subject: [PATCH 08/12] glibmm: fix High Sierra segfault --- pkgs/development/libraries/glibmm/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix index a3af96d51edc..86ed94d7bf34 100644 --- a/pkgs/development/libraries/glibmm/default.nix +++ b/pkgs/development/libraries/glibmm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gnum4, glib, libsigcxx }: +{ stdenv, fetchurl, fetchpatch, pkgconfig, gnum4, glib, libsigcxx }: let ver_maj = "2.54"; @@ -14,6 +14,14 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; + patchFlags = "-p0"; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/macports/macports-ports/e864b2340be9ef003d8ff4aef92e7151d06287dd/devel/glibmm/files/0001-ustring-Fix-wchar-conversion-on-macOS-with-libc.patch"; + sha256 = "02qvnailw1i59cjbj3cy7y02kfcivsvkdjrf4njkp4plarayyqp9"; + }) + ]; + nativeBuildInputs = [ pkgconfig gnum4 ]; propagatedBuildInputs = [ glib libsigcxx ]; From b87cb29d1be6a7729199aa33a5f0e5fd5f9801ef Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 23:00:27 -0500 Subject: [PATCH 09/12] =?UTF-8?q?glibmm:=202.54.1=20=E2=86=92=202.56.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed this was out of date. --- pkgs/development/libraries/glibmm/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix index 86ed94d7bf34..3c3b49e66161 100644 --- a/pkgs/development/libraries/glibmm/default.nix +++ b/pkgs/development/libraries/glibmm/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, gnum4, glib, libsigcxx }: let - ver_maj = "2.54"; - ver_min = "1"; + ver_maj = "2.56"; + ver_min = "0"; in stdenv.mkDerivation rec { name = "glibmm-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://gnome/sources/glibmm/${ver_maj}/${name}.tar.xz"; - sha256 = "0jkapw18icz59cmlmsl00nwwz0wh291kb4hc9z9hxmq45drqrhkw"; + sha256 = "1abrkqhca5p8n6ly3vp1232rny03s7lrd8f8iz2m2m141nxgqx3f"; }; outputs = [ "out" "dev" ]; From ec632b745fb72e5070983dd3dff78ed81466243d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 24 Apr 2018 23:18:35 -0500 Subject: [PATCH 10/12] qtwebengine: rewrite Fixes #39334 and Fixes #36729 Also, Fixes #36932 (hopefully it's still building) (This might be able to be able to be cherry-picked to 18.03 but be careful - chromium is extremely touchy. Probably best to wait for it to be built successfully on Hydra a few times.) --- .../libraries/qt-5/mkDerivation.nix | 5 +- .../libraries/qt-5/modules/qtwebengine.nix | 95 ++++++++++++++++--- 2 files changed, 82 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix index 739c9b4a1608..96014cfbc779 100644 --- a/pkgs/development/libraries/qt-5/mkDerivation.nix +++ b/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -9,9 +9,8 @@ args: let args_ = { - qmakeFlags = - (args.qmakeFlags or []) - ++ [ ("CONFIG+=" + (if debug then "debug" else "release")) ]; + qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ] + ++ (args.qmakeFlags or []); NIX_CFLAGS_COMPILE = optional (!debug) "-DQT_NO_DEBUG" diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 08345510d787..e798d529ce1b 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -11,9 +11,8 @@ , libcap , pciutils , systemd - , enableProprietaryCodecs ? true - +, gn, darwin, openbsm , lib, stdenv # lib.optional, needsPax }: @@ -25,7 +24,7 @@ qtModule { name = "qtwebengine"; qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ]; nativeBuildInputs = [ - bison coreutils flex git gperf ninja pkgconfig python2 which + bison coreutils flex git gperf ninja pkgconfig python2 which gn ]; doCheck = true; outputs = [ "bin" "dev" "out" ]; @@ -61,8 +60,50 @@ qtModule { sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc + '' + + optionalString stdenv.isDarwin '' + # Remove annoying xcode check + substituteInPlace mkspecs/features/platform.prf \ + --replace "lessThan(QMAKE_XCODE_VERSION, 7.3)" false + substituteInPlace src/core/config/mac_osx.pri \ + --replace /usr ${stdenv.cc} \ + --replace "isEmpty(QMAKE_MAC_SDK_VERSION)" false + + # FIXME Needed with old Apple SDKs + # Abandon all hope ye who try to make sense of this. + substituteInPlace src/3rdparty/chromium/base/mac/foundation_util.mm \ + --replace "NSArray*" "NSArray*" + substituteInPlace src/3rdparty/chromium/base/mac/sdk_forward_declarations.h \ + --replace "NSDictionary*" "NSDictionary*" \ + --replace "NSArray*" "NSArray*" \ + --replace "typedef NSString* VNImageOption NS_STRING_ENUM" "typedef NSString* VNImageOption" + + cat < src/3rdparty/chromium/build/mac/find_sdk.py +#!/usr/bin/env python +print("10.10.0") +print("") +EOF + + cat < src/3rdparty/chromium/build/config/mac/sdk_info.py +#!/usr/bin/env python +print('xcode_version="9.1"') +print('xcode_version_int=9') +print('xcode_build="9B55"') +print('machine_os_build="17E199"') +print('sdk_path=""') +print('sdk_version="10.10"') +print('sdk_platform_path=""') +print('sdk_build="17B41"') +EOF + + # Apple has some secret stuff they don't share with OpenBSM + substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \ + --replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]" + substituteInPlace src/3rdparty/chromium/sandbox/mac/bootstrap_sandbox.cc \ + --replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]" ''; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"; preConfigure = '' export NINJAFLAGS=-j$NIX_BUILD_CORES @@ -70,13 +111,9 @@ qtModule { if [ -d "$PWD/tools/qmake" ]; then QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH" fi - ''; + ''; - qmakeFlags = - [ - # Use system Ninja because bootstrapping it is fragile - "WEBENGINE_CONFIG+=use_system_ninja" - ] ++ optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs"; + qmakeFlags = optional enableProprietaryCodecs "-- -proprietary-codecs"; propagatedBuildInputs = [ # Image formats @@ -90,9 +127,10 @@ qtModule { # Text rendering harfbuzz icu - ] - ++ optionals (!stdenv.isDarwin) [ - dbus zlib minizip snappy nss protobuf jsoncpp libevent + + libevent + ] ++ optionals (!stdenv.isDarwin) [ + dbus zlib minizip snappy nss protobuf jsoncpp # Audio formats alsaLib @@ -106,17 +144,44 @@ qtModule { # X11 libs xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst xorg.libXcomposite xorg.libXdamage libdrm - ]; + ] + + # FIXME These dependencies shouldn't be needed but can't find a way + # around it. Chromium pulls this in while bootstrapping GN. + ++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + libobjc + cctools + + # frameworks + ApplicationServices + Foundation + AppKit + ImageCaptureCore + CoreBluetooth + IOBluetooth + CoreWLAN + Quartz + Cocoa + + openbsm + libunwind + ]); dontUseNinjaBuild = true; dontUseNinjaInstall = true; - postInstall = '' + postInstall = lib.optionalString stdenv.isLinux '' cat > $out/libexec/qt.conf < Date: Wed, 25 Apr 2018 00:10:08 -0500 Subject: [PATCH 11/12] live555: add aarch64-linux entry Fixes eval --- pkgs/development/libraries/live555/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/live555/default.nix b/pkgs/development/libraries/live555/default.nix index 69c16878fdf5..e0cf3328bac2 100644 --- a/pkgs/development/libraries/live555/default.nix +++ b/pkgs/development/libraries/live555/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { x86_64-darwin = "macosx"; i686-linux = "linux"; x86_64-linux = "linux-64bit"; + aarch64-linux = "linux-64bit"; }.${stdenv.system}} ''; From 0a8c91a931ea270e8b1d66f592f6acba9b4b5fcf Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 25 Apr 2018 00:17:21 -0500 Subject: [PATCH 12/12] inkscape: typo --- pkgs/applications/graphics/inkscape/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index b5d11d912a5e..9a8ef6bd7744 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -63,6 +63,6 @@ stdenv.mkDerivation rec { If you want to import .eps files install ps2edit. ''; - maintainers = with maintainters; [ matthewbauer ]; + maintainers = with maintainers; [ matthewbauer ]; }; }