1{ lib
2, buildPythonPackage
3, fetchurl
4, meson
5, ninja
6
7, pkg-config
8, python
9, pygobject3
10, gobject-introspection
11, gst_all_1
12, isPy3k
13}:
14
15buildPythonPackage rec {
16 pname = "gst-python";
17 version = "1.22.6";
18
19 format = "other";
20
21 outputs = [ "out" "dev" ];
22
23 src = fetchurl {
24 url = "${meta.homepage}/src/gst-python/${pname}-${version}.tar.xz";
25 hash = "sha256-Ud4tbROxLOCV6sl8C5TuWcKuujcSu3Rit4xNV93hdsU=";
26 };
27
28 # Python 2.x is not supported.
29 disabled = !isPy3k;
30
31 depsBuildBuild = [
32 pkg-config
33 ];
34
35 nativeBuildInputs = [
36 meson
37 ninja
38 pkg-config
39 gobject-introspection
40 gst_all_1.gst-plugins-base
41 ];
42
43 propagatedBuildInputs = [
44 gst_all_1.gst-plugins-base
45 pygobject3
46 ];
47
48 mesonFlags = [
49 "-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
50 # Exec format error during configure
51 "-Dpython=${python.pythonOnBuildForHost.interpreter}"
52 ];
53
54 doCheck = true;
55
56 # TODO: Meson setup hook does not like buildPythonPackage
57 # https://github.com/NixOS/nixpkgs/issues/47390
58 installCheckPhase = "meson test --print-errorlogs";
59
60 meta = with lib; {
61 homepage = "https://gstreamer.freedesktop.org";
62 description = "Python bindings for GStreamer";
63 license = licenses.lgpl2Plus;
64 maintainers = with maintainers; [ lilyinstarlight ];
65 };
66}