1{
2 lib,
3 buildPythonPackage,
4 fetchurl,
5 meson,
6 ninja,
7
8 pkg-config,
9 python,
10 pygobject3,
11 gobject-introspection,
12 gst_all_1,
13 isPy3k,
14}:
15
16buildPythonPackage rec {
17 pname = "gst-python";
18 version = "1.24.7";
19
20 format = "other";
21
22 outputs = [
23 "out"
24 "dev"
25 ];
26
27 src = fetchurl {
28 url = "https://gstreamer.freedesktop.org/src/gst-python/${pname}-${version}.tar.xz";
29 hash = "sha256-bD7gKyDICobiQkWwYQLa4A4BdobydAdib0TcA6w8pTo=";
30 };
31
32 # Python 2.x is not supported.
33 disabled = !isPy3k;
34
35 depsBuildBuild = [ pkg-config ];
36
37 nativeBuildInputs = [
38 meson
39 ninja
40 pkg-config
41 gobject-introspection
42 gst_all_1.gst-plugins-base
43 ];
44
45 propagatedBuildInputs = [
46 gst_all_1.gst-plugins-base
47 pygobject3
48 ];
49
50 mesonFlags = [
51 "-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides"
52 # Exec format error during configure
53 "-Dpython=${python.pythonOnBuildForHost.interpreter}"
54 ];
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 = [ ];
65 };
66}