gst_all_1: Fix evaluation on Darwin, fix gstreamer builds.
Commit be382109ad01d0aa8660f2b19a20e345c86d246b broke evaluation on Darwin because it added these unconditional buildInputs that don't evaluate on Darwin: libnice librdf lilv lv2 serd sord sratom This commit fixes it, and also fixes recently-added new dependencies for other packages accordingly. It further fixes the build of many gstreamer packages on Darwin.
This commit is contained in:
parent
ffc9bdea32
commit
2c800ed685
@ -34,6 +34,7 @@
|
|||||||
, bluez
|
, bluez
|
||||||
, chromaprint
|
, chromaprint
|
||||||
, curl
|
, curl
|
||||||
|
, darwin
|
||||||
, directfb
|
, directfb
|
||||||
, fdk_aac
|
, fdk_aac
|
||||||
, flite
|
, flite
|
||||||
@ -115,38 +116,24 @@ in stdenv.mkDerivation rec {
|
|||||||
libass
|
libass
|
||||||
libkate
|
libkate
|
||||||
libmms
|
libmms
|
||||||
libnice
|
|
||||||
webrtc-audio-processing # webrtc
|
webrtc-audio-processing # webrtc
|
||||||
libbs2b
|
libbs2b
|
||||||
ladspaH
|
|
||||||
librdf # ladspa plug-in
|
|
||||||
lilv
|
|
||||||
lv2
|
|
||||||
serd
|
|
||||||
sord
|
|
||||||
sratom # lv2 plug-in
|
|
||||||
libmodplug
|
libmodplug
|
||||||
mpeg2dec
|
mpeg2dec
|
||||||
openjpeg
|
openjpeg
|
||||||
libopus
|
libopus
|
||||||
librsvg
|
librsvg
|
||||||
bluez
|
|
||||||
chromaprint
|
|
||||||
curl.dev
|
curl.dev
|
||||||
directfb
|
|
||||||
fdk_aac
|
fdk_aac
|
||||||
flite
|
|
||||||
gsm
|
gsm
|
||||||
libaom
|
libaom
|
||||||
libdc1394
|
libdc1394
|
||||||
libde265
|
libde265
|
||||||
libdrm
|
|
||||||
libdvdnav
|
libdvdnav
|
||||||
libdvdread
|
libdvdread
|
||||||
libgudev
|
|
||||||
libofa
|
|
||||||
libsndfile
|
libsndfile
|
||||||
libusb1
|
libusb1
|
||||||
|
mjpegtools
|
||||||
neon
|
neon
|
||||||
openal
|
openal
|
||||||
opencv4
|
opencv4
|
||||||
@ -154,9 +141,7 @@ in stdenv.mkDerivation rec {
|
|||||||
openh264
|
openh264
|
||||||
rtmpdump
|
rtmpdump
|
||||||
pango
|
pango
|
||||||
sbc
|
|
||||||
soundtouch
|
soundtouch
|
||||||
spandsp
|
|
||||||
srtp
|
srtp
|
||||||
fluidsynth
|
fluidsynth
|
||||||
libvdpau
|
libvdpau
|
||||||
@ -175,6 +160,7 @@ in stdenv.mkDerivation rec {
|
|||||||
] ++ optionals faacSupport [
|
] ++ optionals faacSupport [
|
||||||
faac
|
faac
|
||||||
] ++ optionals stdenv.isLinux [
|
] ++ optionals stdenv.isLinux [
|
||||||
|
bluez
|
||||||
wayland
|
wayland
|
||||||
] ++ optionals (!stdenv.isDarwin) [
|
] ++ optionals (!stdenv.isDarwin) [
|
||||||
# wildmidi requires apple's OpenAL
|
# wildmidi requires apple's OpenAL
|
||||||
@ -182,7 +168,40 @@ in stdenv.mkDerivation rec {
|
|||||||
wildmidi
|
wildmidi
|
||||||
# TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin
|
# TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin
|
||||||
mjpegtools
|
mjpegtools
|
||||||
];
|
|
||||||
|
chromaprint
|
||||||
|
directfb
|
||||||
|
flite
|
||||||
|
libdrm
|
||||||
|
libgudev
|
||||||
|
libnice
|
||||||
|
libofa
|
||||||
|
librdf
|
||||||
|
sbc
|
||||||
|
spandsp
|
||||||
|
|
||||||
|
# ladspa plug-in
|
||||||
|
ladspaH
|
||||||
|
librdf # TODO: make build on Darwin
|
||||||
|
|
||||||
|
# lv2 plug-in
|
||||||
|
lilv
|
||||||
|
lv2
|
||||||
|
serd
|
||||||
|
sord
|
||||||
|
sratom
|
||||||
|
] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
|
# 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
|
||||||
|
CoreMedia
|
||||||
|
CoreVideo
|
||||||
|
Foundation
|
||||||
|
MediaToolbox
|
||||||
|
]);
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
||||||
@ -220,8 +239,37 @@ in stdenv.mkDerivation rec {
|
|||||||
# see https://github.com/NixOS/nixpkgs/issues/54395
|
# see https://github.com/NixOS/nixpkgs/issues/54395
|
||||||
"-Dnvdec=disabled"
|
"-Dnvdec=disabled"
|
||||||
"-Dnvenc=disabled"
|
"-Dnvenc=disabled"
|
||||||
|
]
|
||||||
|
++ optionals stdenv.isDarwin [
|
||||||
|
"-Dbluez=disabled"
|
||||||
|
"-Dchromaprint=disabled"
|
||||||
|
"-Ddirectfb=disabled"
|
||||||
|
"-Dflite=disabled"
|
||||||
|
"-Dkms=disabled" # renders to libdrm output
|
||||||
|
"-Dofa=disabled"
|
||||||
|
"-Dlv2=disabled"
|
||||||
|
"-Dsbc=disabled"
|
||||||
|
"-Dspandsp=disabled"
|
||||||
|
"-Ddvb=disabled"
|
||||||
|
"-Dfbdev=disabled"
|
||||||
|
"-Duvch264=disabled" # requires gudev
|
||||||
|
"-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) [
|
||||||
|
"-Dwayland=disabled"
|
||||||
|
] ++ 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"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# This package has some `_("string literal")` string formats
|
||||||
|
# that trip up clang with format security enabled.
|
||||||
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
doCheck = false; # fails 20 out of 58 tests, expensive
|
doCheck = false; # fails 20 out of 58 tests, expensive
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
, libopus
|
, libopus
|
||||||
, isocodes
|
, isocodes
|
||||||
, libjpeg
|
, libjpeg
|
||||||
|
, libpng
|
||||||
, libvisual
|
, libvisual
|
||||||
, tremor # provides 'virbisidec'
|
, tremor # provides 'virbisidec'
|
||||||
, libGL
|
, libGL
|
||||||
@ -27,8 +28,12 @@
|
|||||||
, wayland
|
, wayland
|
||||||
, enableAlsa ? stdenv.isLinux
|
, enableAlsa ? stdenv.isLinux
|
||||||
, alsaLib
|
, alsaLib
|
||||||
|
# Enabling Cocoa seems to currently not work, giving compile
|
||||||
|
# errors. Suspected is that a newer version than clang
|
||||||
|
# is needed than 5.0 but it is not clear.
|
||||||
, enableCocoa ? false
|
, enableCocoa ? false
|
||||||
, darwin
|
, darwin
|
||||||
|
, enableGl ? (enableX11 || enableWayland || enableCocoa)
|
||||||
, enableCdparanoia ? (!stdenv.isDarwin)
|
, enableCdparanoia ? (!stdenv.isDarwin)
|
||||||
, cdparanoia
|
, cdparanoia
|
||||||
}:
|
}:
|
||||||
@ -68,11 +73,16 @@ stdenv.mkDerivation rec {
|
|||||||
libintl
|
libintl
|
||||||
libopus
|
libopus
|
||||||
isocodes
|
isocodes
|
||||||
|
libpng
|
||||||
libjpeg
|
libjpeg
|
||||||
tremor
|
tremor
|
||||||
libGL
|
libGL
|
||||||
] ++ lib.optional (!stdenv.isDarwin) libvisual
|
] ++ lib.optional (!stdenv.isDarwin) [
|
||||||
++ lib.optional enableAlsa alsaLib
|
libvisual
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
pango
|
||||||
|
darwin.apple_sdk.frameworks.OpenGL
|
||||||
|
] ++ lib.optional enableAlsa alsaLib
|
||||||
++ lib.optionals enableX11 [ libXv pango ]
|
++ lib.optionals enableX11 [ libXv pango ]
|
||||||
++ lib.optional enableWayland wayland
|
++ lib.optional enableWayland wayland
|
||||||
++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
|
++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
|
||||||
@ -85,6 +95,7 @@ stdenv.mkDerivation rec {
|
|||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
||||||
"-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing
|
"-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing
|
||||||
|
"-Dgl_platform=[${lib.optionalString (enableX11 || enableWayland || enableCocoa) "auto"}]"
|
||||||
# See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices
|
# See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices
|
||||||
"-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]"
|
"-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]"
|
||||||
# We must currently disable gtk_doc API docs generation,
|
# We must currently disable gtk_doc API docs generation,
|
||||||
@ -98,15 +109,40 @@ stdenv.mkDerivation rec {
|
|||||||
]
|
]
|
||||||
++ lib.optional (!enableX11) "-Dx11=disabled"
|
++ lib.optional (!enableX11) "-Dx11=disabled"
|
||||||
# TODO How to disable Wayland?
|
# TODO How to disable Wayland?
|
||||||
|
++ lib.optional (!enableGl) "-Dgl=disabled"
|
||||||
++ lib.optional (!enableAlsa) "-Dalsa=disabled"
|
++ lib.optional (!enableAlsa) "-Dalsa=disabled"
|
||||||
++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled";
|
++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled"
|
||||||
|
++ lib.optionals stdenv.isDarwin [
|
||||||
|
"-Dlibvisual=disabled"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs common/scangobj-merge.py
|
patchShebangs common/scangobj-merge.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# This package has some `_("string literal")` string formats
|
||||||
|
# that trip up clang with format security enabled.
|
||||||
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
doCheck = false; # fails, wants DRI access for OpenGL
|
doCheck = false; # fails, wants DRI access for OpenGL
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
# Downstream `gst-*` packages depending on `gst-plugins-base`
|
||||||
|
# have meson build options like 'gl' etc. that depend
|
||||||
|
# on these features being built in `-base`.
|
||||||
|
# If they are not built here, then the downstream builds
|
||||||
|
# will fail, as they, too, use `-Dauto_features=enabled`
|
||||||
|
# which would enable these options unconditionally.
|
||||||
|
# That means we must communicate to these downstream packages
|
||||||
|
# if the `-base` enabled these options or not, so that
|
||||||
|
# the can enable/disable those features accordingly.
|
||||||
|
# The naming `*Enabled` vs `enable*` is intentional to
|
||||||
|
# distinguish inputs from outputs (what is to be built
|
||||||
|
# vs what was built) and to make them easier to search for.
|
||||||
|
glEnabled = enableGl;
|
||||||
|
waylandEnabled = enableWayland;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Base GStreamer plug-ins and helper libraries";
|
description = "Base GStreamer plug-ins and helper libraries";
|
||||||
homepage = "https://gstreamer.freedesktop.org";
|
homepage = "https://gstreamer.freedesktop.org";
|
||||||
|
@ -116,7 +116,14 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ optionals (!stdenv.isLinux || !enableJack) [
|
] ++ optionals (!stdenv.isLinux || !enableJack) [
|
||||||
"-Djack=disabled" # unclear whether Jack works on Darwin
|
"-Djack=disabled" # unclear whether Jack works on Darwin
|
||||||
] ++ optionals (!stdenv.isLinux) [
|
] ++ optionals (!stdenv.isLinux) [
|
||||||
"-Dv4l2-gudev=disabled"
|
"-Ddv1394=disabled" # Linux only
|
||||||
|
"-Doss4=disabled" # Linux only
|
||||||
|
"-Doss=disabled" # Linux only
|
||||||
|
"-Dpulse=disabled" # TODO check if we can keep this enabled
|
||||||
|
"-Dv4l2-gudev=disabled" # Linux-only
|
||||||
|
"-Dv4l2=disabled" # Linux-only
|
||||||
|
"-Dximagesrc=disabled" # Linux-only
|
||||||
|
"-Dpulse=disabled" # TODO check if we can keep this enabled
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user