From 40a88de4076ec224172506e483b04c6668a5b34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 4 Mar 2021 21:01:51 +0100 Subject: [PATCH] gst_all_1: cleanup, remove darwin from inputs --- .../libraries/gstreamer/bad/default.nix | 47 ++++++++++--------- .../libraries/gstreamer/base/default.nix | 9 ++-- .../libraries/gstreamer/core/default.nix | 2 +- .../libraries/gstreamer/default.nix | 10 ++-- .../libraries/gstreamer/devtools/default.nix | 2 +- .../libraries/gstreamer/ges/default.nix | 2 +- .../libraries/gstreamer/good/default.nix | 42 ++++++++--------- .../libraries/gstreamer/libav/default.nix | 2 +- .../gstreamer/rtsp-server/default.nix | 2 +- .../libraries/gstreamer/ugly/default.nix | 10 ++-- .../libraries/gstreamer/vaapi/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 12 files changed, 67 insertions(+), 65 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 89011b9230f..40b10d0983a 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , meson , ninja @@ -10,7 +11,7 @@ , gobject-introspection , enableZbar ? false , faacSupport ? false -, faac ? null +, faac , faad2 , libass , libkate @@ -34,7 +35,6 @@ , bluez , chromaprint , curl -, darwin , directfb , fdk_aac , flite @@ -80,20 +80,23 @@ , libxml2 , srt , vo-aacenc +, VideoToolbox +, AudioToolbox +, AVFoundation +, CoreMedia +, CoreVideo +, Foundation +, MediaToolbox }: -assert faacSupport -> faac != null; - -let - inherit (lib) optional optionals; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "gst-plugins-bad"; version = "1.18.2"; outputs = [ "out" "dev" ]; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "06ildd4rl6cynirv3p00d2ddf5is9svj4i7mkahldzhq24pq5mca"; }; @@ -110,7 +113,7 @@ in stdenv.mkDerivation rec { python3 gettext gobject-introspection - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ wayland # for wayland-scanner ]; @@ -166,16 +169,16 @@ in stdenv.mkDerivation rec { libintl srt vo-aacenc - ] ++ optionals enableZbar [ + ] ++ lib.optionals enableZbar [ zbar - ] ++ optionals faacSupport [ + ] ++ lib.optionals faacSupport [ faac - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ bluez libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs wayland wayland-protocols - ] ++ optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ # wildmidi requires apple's OpenAL # TODO: package apple's OpenAL, fix wildmidi, include on Darwin wildmidi @@ -202,7 +205,7 @@ in stdenv.mkDerivation rec { serd sord sratom - ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.isDarwin [ # For unknown reasons the order is important, e.g. if # VideoToolbox is last, we get: # fatal error: 'VideoToolbox/VideoToolbox.h' file not found @@ -213,7 +216,7 @@ in stdenv.mkDerivation rec { CoreVideo Foundation MediaToolbox - ]); + ]; mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users @@ -251,10 +254,10 @@ in stdenv.mkDerivation rec { "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing "-Dzxing=disabled" # required `zxing-cpp` library not packaged in nixpkgs as of writing ] - ++ optionals (!stdenv.isLinux) [ + ++ lib.optionals (!stdenv.isLinux) [ "-Dva=disabled" # see comment on `libva` in `buildInputs` ] - ++ optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.isDarwin [ "-Dbluez=disabled" "-Dchromaprint=disabled" "-Ddirectfb=disabled" @@ -271,11 +274,11 @@ in stdenv.mkDerivation rec { "-Dladspa=disabled" # requires lrdf "-Dwebrtc=disabled" # requires libnice, which as of writing doesn't work on Darwin in nixpkgs "-Dwildmidi=disabled" # see dependencies above - ] ++ optionals (!gst-plugins-base.glEnabled) [ - "-Dgl=disabled"] - ++ optionals (!gst-plugins-base.waylandEnabled) [ + ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ + "-Dgl=disabled" + ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [ "-Dwayland=disabled" - ] ++ optionals (!gst-plugins-base.glEnabled) [ + ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, # but its meson build system does not declare the dependency. "-Dapplemedia=disabled" diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index bac59ac4c48..4f392622065 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -31,7 +31,8 @@ # errors. Suspected is that a newer version than clang # is needed than 5.0 but it is not clear. , enableCocoa ? false -, darwin +, Cocoa +, OpenGL , enableGl ? (enableX11 || enableWayland || enableCocoa) , enableCdparanoia ? (!stdenv.isDarwin) , cdparanoia @@ -45,7 +46,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1b05kg46azrxxvq42c71071lfsnc34pw4vynnkczdqi6g0gzn16x"; }; @@ -81,7 +82,7 @@ stdenv.mkDerivation rec { libvisual ] ++ lib.optionals stdenv.isDarwin [ pango - darwin.apple_sdk.frameworks.OpenGL + OpenGL ] ++ lib.optionals enableAlsa [ alsaLib ] ++ lib.optionals enableX11 [ @@ -91,7 +92,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals enableWayland [ wayland wayland-protocols - ] ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa + ] ++ 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 a5b4c0b827a..84badf30410 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { outputBin = "dev"; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "0ijlmvr660m8zn09xlmnq1ajrziqsivp2hig5a9mabhcjx7ypkb6"; }; diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index 1fdd67d836e..a86308ea3ce 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -1,17 +1,17 @@ -{ callPackage, CoreServices }: +{ callPackage, AudioToolbox, AVFoundation, Cocoa, CoreFoundation, CoreMedia, CoreServices, CoreVideo, DiskArbitration, Foundation, IOKit, MediaToolbox, OpenGL, VideoToolbox }: rec { gstreamer = callPackage ./core { inherit CoreServices; }; gstreamermm = callPackage ./gstreamermm { }; - gst-plugins-base = callPackage ./base { inherit gstreamer; }; + gst-plugins-base = callPackage ./base { inherit gstreamer Cocoa OpenGL; }; - gst-plugins-good = callPackage ./good { inherit gst-plugins-base; }; + gst-plugins-good = callPackage ./good { inherit gst-plugins-base Cocoa; }; - gst-plugins-bad = callPackage ./bad { inherit gst-plugins-base; }; + gst-plugins-bad = callPackage ./bad { inherit gst-plugins-base AudioToolbox AVFoundation CoreMedia CoreVideo Foundation MediaToolbox VideoToolbox; }; - gst-plugins-ugly = callPackage ./ugly { inherit gst-plugins-base; }; + gst-plugins-ugly = callPackage ./ugly { inherit gst-plugins-base CoreFoundation DiskArbitration IOKit; }; gst-rtsp-server = callPackage ./rtsp-server { inherit gst-plugins-base gst-plugins-bad; }; diff --git a/pkgs/development/libraries/gstreamer/devtools/default.nix b/pkgs/development/libraries/gstreamer/devtools/default.nix index dc53a76bbca..a39eadafb0b 100644 --- a/pkgs/development/libraries/gstreamer/devtools/default.nix +++ b/pkgs/development/libraries/gstreamer/devtools/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { version = "1.18.2"; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "0mhascwvgirgh7b5dykpnk06f7f5g62gh3sl30i6kygiidqkv9vf"; }; diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index ebd5f83dd15..774fefbc358 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { ]; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "0pv2k8zlpn3vv2sdlspi3m63ixcwzi90pjly2ypbkg59ab97rb15"; }; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 3ab25863a80..b08759b8dba 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -25,13 +25,13 @@ , libsoup , libpulseaudio , libintl -, darwin +, Cocoa , lame , mpg123 , twolame -, gtkSupport ? false, gtk3 ? null -, qt5Support ? false, qt5 ? null -, raspiCameraSupport ? false, libraspberrypi ? null +, gtkSupport ? false, gtk3 +, qt5Support ? false, qt5 +, raspiCameraSupport ? false, libraspberrypi , enableJack ? true, libjack2 , libXdamage , libXext @@ -44,12 +44,8 @@ , wavpack }: -assert gtkSupport -> gtk3 != null; -assert raspiCameraSupport -> ((libraspberrypi != null) && stdenv.isLinux && stdenv.isAarch64); +assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch64); -let - inherit (lib) optionals; -in stdenv.mkDerivation rec { pname = "gst-plugins-good"; version = "1.18.2"; @@ -57,7 +53,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1929nhjsvbl4bw37nfagnfsnxz737cm2x3ayz9ayrn9lwkfm45zp"; }; @@ -68,7 +64,7 @@ stdenv.mkDerivation rec { ninja gettext nasm - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ wayland-protocols ]; @@ -98,39 +94,39 @@ stdenv.mkDerivation rec { xorg.libXfixes xorg.libXdamage wavpack - ] ++ optionals raspiCameraSupport [ + ] ++ lib.optionals raspiCameraSupport [ libraspberrypi - ] ++ optionals gtkSupport [ + ] ++ lib.optionals gtkSupport [ # for gtksink gtk3 - ] ++ optionals qt5Support (with qt5; [ + ] ++ lib.optionals qt5Support (with qt5; [ qtbase qtdeclarative qtwayland qtx11extras - ]) ++ optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.Cocoa - ] ++ optionals stdenv.isLinux [ + ]) ++ lib.optionals stdenv.isDarwin [ + Cocoa + ] ++ lib.optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 libgudev wayland - ] ++ optionals enableJack [ + ] ++ lib.optionals enableJack [ libjack2 ]; mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing - ] ++ optionals (!qt5Support) [ + ] ++ lib.optionals (!qt5Support) [ "-Dqt5=disabled" - ] ++ optionals (!gtkSupport) [ + ] ++ lib.optionals (!gtkSupport) [ "-Dgtk3=disabled" - ] ++ optionals (!enableJack) [ + ] ++ lib.optionals (!enableJack) [ "-Djack=disabled" - ] ++ optionals (!stdenv.isLinux) [ + ] ++ lib.optionals (!stdenv.isLinux) [ "-Ddv1394=disabled" # Linux only "-Doss4=disabled" # Linux only "-Doss=disabled" # Linux only @@ -138,7 +134,7 @@ stdenv.mkDerivation rec { "-Dv4l2-gudev=disabled" # Linux-only "-Dv4l2=disabled" # Linux-only "-Dximagesrc=disabled" # Linux-only - ] ++ optionals (!raspiCameraSupport) [ + ] ++ lib.optionals (!raspiCameraSupport) [ "-Drpicamsrc=disabled" ]; diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index 3175cff4aca..f0755f201d4 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { version = "1.18.2"; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "0jbzams9ggk3sq9ywv4gsl9rghyn203l2582m6l5c1sz9ka9m5in"; }; diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index bcecd11ce2d..037face3d12 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { version = "1.18.2"; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1qjlp7az0hkzxvq53hwnp55sp6xhbybfwzaj66hp45jslsmj4fcp"; }; diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 8f35829ed38..7c70b7ead1a 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -16,7 +16,9 @@ , libintl , lib , opencore-amr -, darwin +, IOKit +, CoreFoundation +, DiskArbitration }: stdenv.mkDerivation rec { @@ -26,7 +28,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1nwbcv5yaib3d8icvyja3zf6lyjf5zf1hndbijrhj8j7xlia0dx3"; }; @@ -49,11 +51,11 @@ stdenv.mkDerivation rec { x264 libintl opencore-amr - ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.isDarwin [ IOKit CoreFoundation DiskArbitration - ]); + ]; mesonFlags = [ "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index a90d21c28e8..2c92cd2236f 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { version = "1.18.2"; src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1h67n7wk1297rzynknbyv44gdacblvkcvb37x8yxi5d0zms2qywc"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ff479bceb3..e83dcf37c7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14181,7 +14181,7 @@ in gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer { callPackage = newScope { libav = pkgs.ffmpeg; }; - inherit (darwin.apple_sdk.frameworks) CoreServices; + inherit (darwin.apple_sdk.frameworks) AudioToolbox AVFoundation Cocoa CoreFoundation CoreMedia CoreServices CoreVideo DiskArbitration Foundation IOKit MediaToolbox OpenGL VideoToolbox; }); gusb = callPackage ../development/libraries/gusb { };