2019-10-02 10:04:13 -07:00
{ stdenv
, fetchurl
, meson
2020-10-01 15:31:58 -07:00
, nasm
2019-10-02 10:04:13 -07:00
, ninja
, pkgconfig
2019-12-14 13:18:51 -08:00
, python3
2019-10-02 10:04:13 -07:00
, gst-plugins-base
, orc
, bzip2
, gettext
, libv4l
, libdv
, libavc1394
, libiec61883
, libvpx
, speex
, flac
, taglib
, libshout
, cairo
, gdk-pixbuf
, aalib
, libcaca
, libsoup
, libpulseaudio
, libintl
, darwin
, lame
, mpg123
, twolame
2018-04-04 08:43:36 -07:00
, gtkSupport ? false , gtk3 ? null
2020-04-11 10:26:26 -07:00
, enableJack ? true , libjack2
2019-01-22 03:57:56 -08:00
, libXdamage
, libXext
, libXfixes
2018-04-24 16:35:54 -07:00
, ncurses
2020-10-01 15:31:58 -07:00
, wayland
, wayland-protocols
2019-01-20 17:48:04 -08:00
, xorg
, libgudev
, wavpack
2013-12-23 07:36:37 -08:00
} :
2018-04-04 08:43:36 -07:00
assert gtkSupport -> gtk3 != null ;
2015-04-08 18:53:06 -07:00
let
2019-11-27 09:51:03 -08:00
inherit ( stdenv . lib ) optionals ;
2015-04-08 18:53:06 -07:00
in
2013-12-23 07:36:37 -08:00
stdenv . mkDerivation rec {
2019-08-15 05:41:18 -07:00
pname = " g s t - p l u g i n s - g o o d " ;
2020-10-01 15:31:58 -07:00
version = " 1 . 1 8 . 0 " ;
2013-12-23 07:36:37 -08:00
2019-10-02 10:04:13 -07:00
outputs = [ " o u t " " d e v " ] ;
2013-12-23 07:36:37 -08:00
src = fetchurl {
2019-10-02 09:59:16 -07:00
url = " ${ meta . homepage } / s r c / ${ pname } / ${ pname } - ${ version } . t a r . x z " ;
2020-10-01 15:31:58 -07:00
sha256 = " 1 b 4 b 3 a 6 f m 2 w y q p n x 3 0 0 p g 1 s z 0 1 m 9 q h f a j a d k 3 b 7 s b z i s g 8 v v q a b 3 " ;
2013-12-23 07:36:37 -08:00
} ;
2019-10-02 10:04:13 -07:00
nativeBuildInputs = [
pkgconfig
2019-12-14 13:18:51 -08:00
python3
2019-10-02 10:04:13 -07:00
meson
ninja
gettext
2020-10-01 15:31:58 -07:00
nasm
] ++ optionals stdenv . isLinux [
wayland-protocols
2019-10-02 10:04:13 -07:00
] ;
2018-04-24 16:35:54 -07:00
2013-12-23 07:36:37 -08:00
buildInputs = [
2019-10-02 10:04:13 -07:00
gst-plugins-base
orc
bzip2
libdv
libvpx
speex
flac
taglib
cairo
gdk-pixbuf
aalib
libcaca
libsoup
libshout
lame
mpg123
twolame
libintl
2019-05-01 07:10:36 -07:00
libXdamage
libXext
libXfixes
2018-04-24 16:35:54 -07:00
ncurses
2019-05-01 07:10:36 -07:00
xorg . libXfixes
xorg . libXdamage
2019-01-20 17:48:04 -08:00
wavpack
2019-11-27 09:51:03 -08:00
] ++ optionals gtkSupport [
2019-10-02 10:04:13 -07:00
# for gtksink
gtk3
] ++ optionals stdenv . isDarwin [
darwin . apple_sdk . frameworks . Cocoa
] ++ optionals stdenv . isLinux [
libv4l
libpulseaudio
libavc1394
libiec61883
libgudev
2020-10-01 15:31:58 -07:00
wayland
2020-04-11 10:26:26 -07:00
] ++ optionals enableJack [
libjack2
2019-05-01 07:10:36 -07:00
] ;
2019-01-20 17:48:04 -08:00
mesonFlags = [
" - D e x a m p l e s = d i s a b l e d " # requires many dependencies and probably not useful for our users
2020-10-01 15:31:58 -07:00
" - D d o c = d i s a b l e d " # `hotdoc` not packaged in nixpkgs as of writing
2019-01-20 17:48:04 -08:00
" - D q t 5 = d i s a b l e d " # not clear as of writing how to correctly pass in the required qt5 deps
2019-10-02 10:04:13 -07:00
] ++ optionals ( ! gtkSupport ) [
" - D g t k 3 = d i s a b l e d "
2020-04-11 10:26:26 -07:00
] ++ optionals ( ! enableJack ) [
" - D j a c k = d i s a b l e d "
2019-10-02 10:04:13 -07:00
] ++ optionals ( ! stdenv . isLinux ) [
2019-05-01 09:44:08 -07:00
" - D d v 1 3 9 4 = d i s a b l e d " # Linux only
" - D o s s 4 = d i s a b l e d " # Linux only
" - D o s s = d i s a b l e d " # Linux only
" - D p u l s e = d i s a b l e d " # TODO check if we can keep this enabled
" - D v 4 l 2 - g u d e v = d i s a b l e d " # Linux-only
" - D v 4 l 2 = d i s a b l e d " # Linux-only
" - D x i m a g e s r c = d i s a b l e d " # Linux-only
" - D p u l s e = d i s a b l e d " # TODO check if we can keep this enabled
2020-10-01 15:31:58 -07:00
] ++ optionals ( ! ( stdenv . isLinux && stdenv . hostPlatform . isAarch64 ) ) [
" - D r p i c a m s r c = d i s a b l e d " # only works on Linux aarch64, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/428c9b60532917c0ac49c9d48b15bdcd00a1370b/sys/rpicamsrc/meson.build#L10
2019-01-20 17:48:04 -08:00
] ;
2015-04-08 18:53:06 -07:00
2020-10-01 15:31:58 -07:00
postPatch = ''
patchShebangs \
scripts/extract-release-date-from-doap-file.py
'' ;
2019-10-02 10:04:13 -07:00
NIX_LDFLAGS = [
# linking error on Darwin
# https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896
" - l n c u r s e s "
] ;
2018-08-08 11:34:10 -07:00
# fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
doCheck = false ;
2019-10-02 10:04:13 -07:00
meta = with stdenv . lib ; {
description = " G S t r e a m e r G o o d P l u g i n s " ;
homepage = " h t t p s : / / g s t r e a m e r . f r e e d e s k t o p . o r g " ;
longDescription = ''
a set of plug-ins that we consider to have good quality code ,
correct functionality , our preferred license ( LGPL for the plug-in
code , LGPL or LGPL-compatible for the supporting library ) .
'' ;
license = licenses . lgpl2Plus ;
platforms = platforms . linux ++ platforms . darwin ;
maintainers = with maintainers ; [ matthewbauer ] ;
} ;
2013-12-23 07:36:37 -08:00
}