2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
, pkg-config
|
2022-05-18 14:49:53 +00:00
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
, pygobject3
|
|
|
|
, gobject-introspection
|
|
|
|
, gst-plugins-base
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gst-python";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.20.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/src/gst-python/${pname}-${version}.tar.xz";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "j2e9xWBrozYGxryJbonefc2M9PykWfcTibG2/gdbXlQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
# Python 2.x is not supported.
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2022-05-18 14:49:53 +00:00
|
|
|
python
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
|
|
|
gst-plugins-base
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
gst-plugins-base
|
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2022-05-18 14:49:53 +00:00
|
|
|
"-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# TODO: Meson setup hook does not like buildPythonPackage
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/47390
|
|
|
|
installCheckPhase = "meson test --print-errorlogs";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gstreamer.freedesktop.org";
|
|
|
|
description = "Python bindings for GStreamer";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|