diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index b7d246e64088..eab5dbffd8ca 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -95,14 +95,6 @@ libfreeaptx, zxing-cpp, usrsctp, - VideoToolbox, - AudioToolbox, - AVFoundation, - Cocoa, - CoreMedia, - CoreVideo, - Foundation, - MediaToolbox, directoryListingUpdater, enableGplPlugins ? true, bluezSupport ? stdenv.hostPlatform.isLinux, @@ -113,7 +105,7 @@ hotdoc, guiSupport ? true, gst-plugins-bad, - apple-sdk_13, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -274,18 +266,7 @@ stdenv.mkDerivation (finalAttrs: { gtk3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # For unknown reasons the order is important, e.g. if - # VideoToolbox is last, we get: - # fatal error: 'VideoToolbox/VideoToolbox.h' file not found - VideoToolbox - AudioToolbox - AVFoundation - Cocoa - CoreMedia - CoreVideo - Foundation - MediaToolbox - apple-sdk_13 + apple-sdk_gstreamer ]; mesonFlags = diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 673aa28cb8ff..59e0054a4091 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -35,10 +35,7 @@ wayland-protocols, enableAlsa ? stdenv.hostPlatform.isLinux, alsa-lib, - # TODO: fix once x86_64-darwin sdk updated - enableCocoa ? (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64), - Cocoa, - OpenGL, + enableCocoa ? stdenv.hostPlatform.isDarwin, enableGl ? (enableX11 || enableWayland || enableCocoa), enableCdparanoia ? (!stdenv.hostPlatform.isDarwin), cdparanoia, @@ -48,6 +45,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -109,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: { libGL ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - OpenGL + apple-sdk_gstreamer ] ++ lib.optionals enableAlsa [ alsa-lib @@ -123,7 +121,6 @@ stdenv.mkDerivation (finalAttrs: { wayland wayland-protocols ] - ++ lib.optional enableCocoa Cocoa ++ lib.optional enableCdparanoia cdparanoia; propagatedBuildInputs = diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index ad189e8892af..8b8900058d28 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -14,9 +14,6 @@ elfutils, # for libdw bash-completion, lib, - Cocoa, - CoreServices, - xpc, testers, rustc, withRust ? @@ -35,6 +32,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: let @@ -102,9 +100,7 @@ stdenv.mkDerivation (finalAttrs: { libunwind ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Cocoa - CoreServices - xpc + apple-sdk_gstreamer ]; propagatedBuildInputs = [ diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index cdc5b951cfaa..760ec0610dee 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -1,55 +1,31 @@ { config, lib, - stdenv, callPackage, - AVFoundation, - AudioToolbox, - Cocoa, - CoreFoundation, - CoreMedia, - CoreServices, - CoreVideo, - DiskArbitration, - Foundation, - IOKit, - MediaToolbox, - OpenGL, - Security, - SystemConfiguration, - VideoToolbox, - xpc, ipu6ep-camera-hal, ipu6epmtl-camera-hal, + apple-sdk_13, }: +let + apple-sdk_gstreamer = apple-sdk_13; +in { - inherit stdenv; + inherit apple-sdk_gstreamer; - gstreamer = callPackage ./core { inherit Cocoa CoreServices xpc; }; + gstreamer = callPackage ./core { }; gstreamermm = callPackage ./gstreamermm { }; - gst-plugins-base = callPackage ./base { inherit Cocoa OpenGL; }; + gst-plugins-base = callPackage ./base { }; - gst-plugins-good = callPackage ./good { inherit Cocoa; }; + gst-plugins-good = callPackage ./good { }; - gst-plugins-bad = callPackage ./bad { - inherit - AudioToolbox - AVFoundation - Cocoa - CoreMedia - CoreVideo - Foundation - MediaToolbox - VideoToolbox - ; - }; + gst-plugins-bad = callPackage ./bad { }; - gst-plugins-ugly = callPackage ./ugly { inherit CoreFoundation DiskArbitration IOKit; }; + gst-plugins-ugly = callPackage ./ugly { }; - gst-plugins-rs = callPackage ./rs { inherit Security SystemConfiguration; }; + gst-plugins-rs = callPackage ./rs { }; gst-rtsp-server = callPackage ./rtsp-server { }; diff --git a/pkgs/development/libraries/gstreamer/devtools/default.nix b/pkgs/development/libraries/gstreamer/devtools/default.nix index d4427ed650ff..79f0c59b727b 100644 --- a/pkgs/development/libraries/gstreamer/devtools/default.nix +++ b/pkgs/development/libraries/gstreamer/devtools/default.nix @@ -23,6 +23,7 @@ directoryListingUpdater, _experimental-update-script-combinators, common-updater-scripts, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -73,11 +74,15 @@ stdenv.mkDerivation (finalAttrs: { hotdoc ]; - buildInputs = [ - cairo - python3 - json-glib - ]; + buildInputs = + [ + cairo + python3 + json-glib + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ + apple-sdk_gstreamer + ]; propagatedBuildInputs = [ gstreamer diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index 40ac0d18bff4..92baa4bd66f2 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -18,6 +18,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -48,12 +49,16 @@ stdenv.mkDerivation (finalAttrs: { hotdoc ]; - buildInputs = [ - bash-completion - libxml2 - gst-devtools - python3 - ]; + buildInputs = + [ + bash-completion + libxml2 + gst-devtools + python3 + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ]; propagatedBuildInputs = [ gst-plugins-base diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index c643aed4e2d9..36a701fa16dd 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -33,7 +33,6 @@ libpulseaudio, libintl, libxml2, - Cocoa, lame, mpg123, twolame, @@ -62,6 +61,7 @@ hotdoc, gst-plugins-good, directoryListingUpdater, + apple-sdk_gstreamer, }: let @@ -195,7 +195,7 @@ stdenv.mkDerivation (finalAttrs: { ] ) ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Cocoa + apple-sdk_gstreamer ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libdrm diff --git a/pkgs/development/libraries/gstreamer/gstreamermm/default.nix b/pkgs/development/libraries/gstreamer/gstreamermm/default.nix index 462a75392cca..ba486d1cc772 100644 --- a/pkgs/development/libraries/gstreamer/gstreamermm/default.nix +++ b/pkgs/development/libraries/gstreamer/gstreamermm/default.nix @@ -8,6 +8,7 @@ glibmm, gst_all_1, gnome, + apple-sdk_gstreamer, }: stdenv.mkDerivation rec { @@ -32,6 +33,10 @@ stdenv.mkDerivation rec { "dev" ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ]; + nativeBuildInputs = [ pkg-config file diff --git a/pkgs/development/libraries/gstreamer/icamerasrc/default.nix b/pkgs/development/libraries/gstreamer/icamerasrc/default.nix index ff33300e966c..5f6842e7e4ee 100644 --- a/pkgs/development/libraries/gstreamer/icamerasrc/default.nix +++ b/pkgs/development/libraries/gstreamer/icamerasrc/default.nix @@ -8,6 +8,7 @@ ipu6-camera-hal, libdrm, libva, + apple-sdk_gstreamer, }: stdenv.mkDerivation { @@ -33,14 +34,18 @@ stdenv.mkDerivation { export STRIP_VIRTUAL_CHANNEL_CAMHAL=ON ''; - buildInputs = [ - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-bad - ipu6-camera-hal - libdrm - libva - ]; + buildInputs = + [ + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-bad + ipu6-camera-hal + libdrm + libva + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ]; NIX_CFLAGS_COMPILE = [ "-Wno-error" diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index e0987be683b9..72dc282f70cc 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -14,6 +14,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -42,11 +43,15 @@ stdenv.mkDerivation (finalAttrs: { hotdoc ]; - buildInputs = [ - gstreamer - gst-plugins-base - ffmpeg-headless - ]; + buildInputs = + [ + gstreamer + gst-plugins-base + ffmpeg-headless + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ]; mesonFlags = [ (lib.mesonEnable "doc" enableDocumentation) diff --git a/pkgs/development/libraries/gstreamer/rs/default.nix b/pkgs/development/libraries/gstreamer/rs/default.nix index c12726115dbd..1722fc795837 100644 --- a/pkgs/development/libraries/gstreamer/rs/default.nix +++ b/pkgs/development/libraries/gstreamer/rs/default.nix @@ -24,8 +24,6 @@ libwebp, openssl, pango, - Security, - SystemConfiguration, gst-plugins-good, nix-update-script, # specifies a limited subset of plugins to build (the default `null` means all plugins supported on the stdenv platform) @@ -35,6 +33,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform && plugins == null, hotdoc, mopidy, + apple-sdk_gstreamer, }: let @@ -58,31 +57,21 @@ let mp4 = [ ]; # net - aws = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + aws = [ openssl ]; hlssink3 = [ ]; ndi = [ ]; onvif = [ pango ]; raptorq = [ ]; - reqwest = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + reqwest = [ openssl ]; rtp = [ ]; - webrtc = - [ - gst-plugins-bad - openssl - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Security - SystemConfiguration - ]; - webrtchttp = - [ - gst-plugins-bad - openssl - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Security - SystemConfiguration - ]; + webrtc = [ + gst-plugins-bad + openssl + ]; + webrtchttp = [ + gst-plugins-bad + openssl + ]; # text textahead = [ ]; @@ -236,10 +225,15 @@ stdenv.mkDerivation (finalAttrs: { env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; - buildInputs = [ - gstreamer - gst-plugins-base - ] ++ lib.concatMap (plugin: lib.getAttr plugin validPlugins) selectedPlugins; + buildInputs = + [ + gstreamer + gst-plugins-base + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ] + ++ lib.concatMap (plugin: lib.getAttr plugin validPlugins) selectedPlugins; checkInputs = [ gst-plugins-good diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 50b41ee8d28e..dade9cd11663 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -14,6 +14,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -43,10 +44,14 @@ stdenv.mkDerivation (finalAttrs: { hotdoc ]; - buildInputs = [ - gst-plugins-base - gst-plugins-bad - ]; + buildInputs = + [ + gst-plugins-base + gst-plugins-bad + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer + ]; mesonFlags = [ "-Dglib_debug=disabled" # cast checks should be disabled on stable releases diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 92c3f14717f4..0329460a6e8d 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -16,15 +16,13 @@ x264, libintl, lib, - IOKit, - CoreFoundation, - DiskArbitration, enableGplPlugins ? true, # Checks meson.is_cross_build(), so even canExecute isn't enough. enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, gst-plugins-ugly, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -68,9 +66,7 @@ stdenv.mkDerivation (finalAttrs: { x264 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - IOKit - CoreFoundation - DiskArbitration + apple-sdk_gstreamer ]; mesonFlags = diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 9938a92ea3d5..c717fa21e725 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -25,6 +25,7 @@ enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc, directoryListingUpdater, + apple-sdk_gstreamer, }: stdenv.mkDerivation (finalAttrs: { @@ -76,6 +77,9 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libGL libGLU + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_gstreamer ]; strictDeps = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c54236e4bf00..f1ecc485062c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9632,25 +9632,6 @@ with pkgs; gst_all_1 = recurseIntoAttrs ( callPackage ../development/libraries/gstreamer { callPackage = newScope gst_all_1; - stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "12.3" else stdenv; - inherit (darwin.apple_sdk_12_3.frameworks) - AudioToolbox - AVFoundation - Cocoa - CoreFoundation - CoreMedia - CoreServices - CoreVideo - DiskArbitration - Foundation - IOKit - MediaToolbox - OpenGL - Security - SystemConfiguration - VideoToolbox - ; - inherit (darwin.apple_sdk_12_3.libs) xpc; } );