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
|
2022-09-30 11:47:45 +00:00
|
|
|
, gst_all_1
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gst-python";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "1.22.5";
|
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";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-vwUjJBXPYBgUKuUd07iXu3NDJoe1zheGv0btximM5bA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
# Python 2.x is not supported.
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
2022-09-30 11:47:45 +00:00
|
|
|
gst_all_1.gst-plugins-base
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
gst_all_1.gst-plugins-base
|
2020-04-24 23:36:52 +00:00
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2022-05-18 14:49:53 +00:00
|
|
|
"-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
|
2022-09-30 11:47:45 +00:00
|
|
|
# Exec format error during configure
|
|
|
|
"-Dpython=${python.pythonForBuild.interpreter}"
|
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;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ lilyinstarlight ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|