diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 3a270da21e9..60625412617 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -199,6 +199,6 @@ stdenv.mkDerivation rec { homepage = "http://mplayerhq.hu"; license = "GPL"; maintainers = [ stdenv.lib.maintainers.eelco stdenv.lib.maintainers.urkud ]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 5d8c2430ab9..3882e1fb08a 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, alsaLib, pkgconfig }: +{ stdenv, fetchurl, alsaLib, pkgconfig +, AudioUnit, AudioToolbox, CoreAudio, CoreServices, Carbon }: stdenv.mkDerivation rec { name = "portaudio-19-20140130"; @@ -11,31 +12,26 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; - configureFlags = stdenv.lib.optionals stdenv.isDarwin - [ "--build=x86_64" "--without-oss" "--enable-static" "--enable-shared" ]; + configureFlags = [ "--disable-mac-universal" ]; - preBuild = stdenv.lib.optionalString stdenv.isDarwin '' + propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; + + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' sed -i '50 i\ #include \ #include \ #include ' \ include/pa_mac_core.h - - # disable two tests that don't compile - sed -i -e 105d Makefile - sed -i -e 107d Makefile ''; # not sure why, but all the headers seem to be installed by the make install - installPhase = if stdenv.isDarwin then '' - mkdir -p "$out" - cp -r include "$out" - cp -r lib "$out" - '' else '' + installPhase = '' make install - + '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' # fixup .pc file to find alsa library sed -i "s|-lasound|-L${alsaLib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc + '' + stdenv.lib.optionalString stdenv.isDarwin '' + cp include/pa_mac_core.h $out/include/pa_mac_core.h ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 8526a5f5b82..91a8899f4d1 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -4,7 +4,7 @@ , libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig , libtiff, glib, icu, mysql, postgresql, sqlite, perl, coreutils, libXi , buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst_plugins_base -, buildWebkit ? stdenv.isLinux +, buildWebkit ? (stdenv.isLinux || stdenv.isDarwin) , flashplayerFix ? false, gdk_pixbuf , gtkStyle ? false, libgnomeui, gtk2, GConf, gnome_vfs , developerBuild ? false diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index efa5d71a76f..09be8c7c587 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkgconfig, intltool, autoreconfHook +{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook , json_c, libsndfile, libtool , xorg, libcap, alsaLib, glib , avahi, libjack2, libasyncns, lirc, dbus @@ -30,6 +30,8 @@ , # Whether to build only the library. libOnly ? false + +, CoreServices, AudioUnit, Cocoa }: stdenv.mkDerivation rec { @@ -41,7 +43,11 @@ stdenv.mkDerivation rec { sha256 = "11j682g2mn723sz3bh4i44ggq29z053zcggy0glzn63zh9mxdly3"; }; - patches = [ ./caps-fix.patch ]; + patches = [ ./caps-fix.patch ] + ++ stdenv.lib.optional stdenv.isDarwin (fetchpatch { + url = "https://bugs.freedesktop.org/attachment.cgi?id=127889"; + sha256 = "063h5vmh4ykgxjbxyxjlj6qhyyxhazbh3p18p1ik69kq24nkny9m"; + }); outputs = [ "out" "dev" ]; @@ -53,6 +59,7 @@ stdenv.mkDerivation rec { buildInputs = [ json_c libsndfile speexdsp fftwFloat ] ++ lib.optionals stdenv.isLinux [ glib dbus ] + ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit Cocoa ] ++ lib.optionals (!libOnly) ( [ libasyncns webrtc-audio-processing ] ++ lib.optional jackaudioSupport libjack2 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4de9685154..bb6576491bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9091,7 +9091,9 @@ in popt = callPackage ../development/libraries/popt { }; - portaudio = callPackage ../development/libraries/portaudio { }; + portaudio = callPackage ../development/libraries/portaudio { + inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit CoreAudio CoreServices Carbon; + }; portmidi = callPackage ../development/libraries/portmidi {}; @@ -10425,11 +10427,16 @@ in pshs = callPackage ../servers/http/pshs { }; - libpulseaudio = callPackage ../servers/pulseaudio { libOnly = true; }; + libpulseaudio = callPackage ../servers/pulseaudio { + libOnly = true; + inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; + }; # Name is changed to prevent use in packages; # please use libpulseaudio instead. - pulseaudioLight = callPackage ../servers/pulseaudio { }; + pulseaudioLight = callPackage ../servers/pulseaudio { + inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; + }; pulseaudioFull = callPackage ../servers/pulseaudio { gconf = gnome3.gconf; @@ -10440,6 +10447,7 @@ in bluetoothSupport = true; remoteControlSupport = true; zeroconfSupport = true; + inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; }; tomcat_connectors = callPackage ../servers/http/apache-modules/tomcat-connectors { };