4705a06cc0
Documentation was recently enabled, which broke the cross build. Fixes:46bf2c47f0
("gst_all_1.gst-editing-services: 1.20.3 -> 1.22.2") Fixes:782969f5d6
("gst_all_1.gst-rtsp-server: 1.20.3 -> 1.22.2") Fixes:79e42f53c2
("gst_all_1.gst-devtools: 1.20.3 -> 1.22.2") Fixes:50b8c274ea
("gst_all_1.gst-vaapi: 1.20.3 -> 1.22.2") Fixes:26a54eba11
("gst_all_1.gst-libav: 1.20.3 -> 1.22.2") Fixes:a315e09637
("gst_all_1.gst-plugins-ugly: 1.20.3 -> 1.22.2") Fixes:f03d8ba1e1
("gst_all_1.gst-plugins-bad: 1.20.3 -> 1.22.2") Fixes:3028bf5ea3
("gst_all_1.gst-plugins-good: 1.20.3 -> 1.22.2") Fixes:4b859ee802
("gst_all_1.gstreamer: 1.20.3 -> 1.22.2")
125 lines
2.9 KiB
Nix
125 lines
2.9 KiB
Nix
{ stdenv
|
|
, fetchurl
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, gettext
|
|
, bison
|
|
, flex
|
|
, python3
|
|
, glib
|
|
, makeWrapper
|
|
, libcap
|
|
, libunwind
|
|
, elfutils # for libdw
|
|
, bash-completion
|
|
, lib
|
|
, Cocoa
|
|
, CoreServices
|
|
, gobject-introspection
|
|
, testers
|
|
# Checks meson.is_cross_build(), so even canExecute isn't enough.
|
|
, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "gstreamer";
|
|
version = "1.22.2";
|
|
|
|
outputs = [
|
|
"bin"
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
src = let
|
|
inherit (finalAttrs) pname version;
|
|
in fetchurl {
|
|
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
|
|
hash = "sha256-sq/nNgOSHGCLpIlp27fXQ3dnRL/l2AWeziQRN7f4jiE=";
|
|
};
|
|
|
|
depsBuildBuild = [
|
|
pkg-config
|
|
];
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gettext
|
|
bison
|
|
flex
|
|
python3
|
|
makeWrapper
|
|
glib
|
|
bash-completion
|
|
gobject-introspection
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
libcap # for setcap binary
|
|
] ++ lib.optionals enableDocumentation [
|
|
hotdoc
|
|
];
|
|
|
|
buildInputs = [
|
|
bash-completion
|
|
gobject-introspection
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
libcap
|
|
libunwind
|
|
elfutils
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
Cocoa
|
|
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
|
|
(lib.mesonEnable "doc" enableDocumentation)
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
# darwin.libunwind doesn't have pkg-config 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 "$bin/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_1_0=$GST_PLUGIN_SYSTEM_PATH_1_0''${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$(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" "$bin"
|
|
'';
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
meta = with lib; {
|
|
description = "Open source multimedia framework";
|
|
homepage = "https://gstreamer.freedesktop.org";
|
|
license = licenses.lgpl2Plus;
|
|
pkgConfigModules = [
|
|
"gstreamer-controller-1.0"
|
|
];
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ ttuegel matthewbauer ];
|
|
};
|
|
})
|