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
|
2020-11-12 09:05:59 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, pygobject3
|
|
|
|
, gobject-introspection
|
|
|
|
, gst-plugins-base
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gst-python";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "1.18.4";
|
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";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "13h9qzfz8s1gyj2ar9q2gf5346sgdv6jv8hj7aw0hpl2gs5f0s6b";
|
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
|
2020-11-12 09:05:59 +00:00
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
|
|
|
gst-plugins-base
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
gst-plugins-base
|
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2020-11-12 09:05:59 +00:00
|
|
|
"-Dpygi-overrides-dir=${placeholder "out"}/${python3.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
|
|
|
};
|
|
|
|
}
|