1{ buildPythonPackage, fetchurl, stdenv, meson, ninja, pkgconfig, python, pygobject3
2, gst-plugins-base, ncurses
3}:
4
5let
6 pname = "gst-python";
7 version = "1.14.0";
8 name = "${pname}-${version}";
9in buildPythonPackage rec {
10 inherit pname version;
11 format = "other";
12
13 src = fetchurl {
14 urls = [
15 "${meta.homepage}/src/gst-python/${name}.tar.xz"
16 "mirror://gentoo/distfiles/${name}.tar.xz"
17 ];
18 sha256 = "1rlr6gl4lg97ng4jxh3gb2ldmywm15vwsa72nvggr8qa2l8q3fg0";
19 };
20
21 outputs = [ "out" "dev" ];
22
23 nativeBuildInputs = [ meson ninja pkgconfig python ];
24
25 # XXX: in the Libs.private field of python3.pc
26 buildInputs = [ ncurses ];
27
28 mesonFlags = [
29 "-Dpygi-overrides-dir=${python.sitePackages}/gi/overrides"
30 ];
31
32 postPatch = ''
33 chmod +x scripts/pythondetector # patchShebangs requires executable file
34 patchShebangs scripts/pythondetector
35 '';
36
37 propagatedBuildInputs = [ gst-plugins-base pygobject3 ];
38
39 meta = {
40 homepage = https://gstreamer.freedesktop.org;
41
42 description = "Python bindings for GStreamer";
43
44 license = stdenv.lib.licenses.lgpl2Plus;
45 };
46}