0672de5b89
Fixes #98769. Important changes from https://gstreamer.freedesktop.org/releases/1.18/: * `gst-validate` was renamed to `gst-devtools` upstream: > * the `gst-validate` tarball has been superseded by > the `gst-devtools` tarball for consistency with the git module name. * `gst-python` is now Python 3 only: > * Python 2.x is no longer supported
115 lines
2.7 KiB
Nix
115 lines
2.7 KiB
Nix
{ stdenv
|
|
, fetchurl
|
|
, meson
|
|
, ninja
|
|
, pkgconfig
|
|
, gettext
|
|
, gobject-introspection
|
|
, bison
|
|
, flex
|
|
, python3
|
|
, glib
|
|
, makeWrapper
|
|
, libcap
|
|
, libunwind
|
|
, darwin
|
|
, elfutils # for libdw
|
|
, bash-completion
|
|
, lib
|
|
, CoreServices
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gstreamer";
|
|
version = "1.18.0";
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
# "devdoc" # disabled until `hotdoc` is packaged in nixpkgs, see:
|
|
# - https://github.com/NixOS/nixpkgs/pull/98767
|
|
# - https://github.com/NixOS/nixpkgs/issues/98769#issuecomment-702296551
|
|
];
|
|
outputBin = "dev";
|
|
|
|
src = fetchurl {
|
|
url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz";
|
|
sha256 = "01bq1k0gj603zyhq975zl09q4zla12mxqvhmk9fyn2kcn12r5w0g";
|
|
};
|
|
|
|
patches = [
|
|
./fix_pkgconfig_includedir.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkgconfig
|
|
gettext
|
|
bison
|
|
flex
|
|
python3
|
|
makeWrapper
|
|
glib
|
|
gobject-introspection
|
|
bash-completion
|
|
|
|
# documentation
|
|
# TODO add hotdoc here
|
|
];
|
|
|
|
buildInputs = [
|
|
bash-completion
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
libcap
|
|
libunwind
|
|
elfutils
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
CoreServices
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
glib
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those
|
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
|
"-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
# darwin.libunwind doesn't have pkgconfig definitions so meson doesn't detect it.
|
|
"-Dlibunwind=disabled"
|
|
"-Dlibdw=disabled"
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs \
|
|
gst/parse/get_flex_version.py \
|
|
gst/parse/gen_grammar.py.in \
|
|
gst/parse/gen_lex.py.in \
|
|
libs/gst/helpers/ptp_helper_post_install.sh \
|
|
scripts/extract-release-date-from-doap-file.py
|
|
'';
|
|
|
|
postInstall = ''
|
|
for prog in "$dev/bin/"*; do
|
|
# We can't use --suffix here due to quoting so we craft the export command by hand
|
|
wrapProgram "$prog" --run 'export GST_PLUGIN_SYSTEM_PATH=$GST_PLUGIN_SYSTEM_PATH''${GST_PLUGIN_SYSTEM_PATH:+:}$(unset _tmp; for profile in $NIX_PROFILES; do _tmp="$profile/lib/gstreamer-1.0''${_tmp:+:}$_tmp"; done; printf '%s' "$_tmp")'
|
|
done
|
|
'';
|
|
|
|
preFixup = ''
|
|
moveToOutput "share/bash-completion" "$dev"
|
|
'';
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
meta = with lib ;{
|
|
description = "Open source multimedia framework";
|
|
homepage = "https://gstreamer.freedesktop.org";
|
|
license = licenses.lgpl2Plus;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ ttuegel matthewbauer ];
|
|
};
|
|
}
|