1{ lib 2, buildPythonPackage 3, fetchurl 4, meson 5, ninja 6 7, pkg-config 8, python3 9, pygobject3 10, gobject-introspection 11, gst-plugins-base 12, isPy3k 13}: 14 15buildPythonPackage rec { 16 pname = "gst-python"; 17 version = "1.18.4"; 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 sha256 = "13h9qzfz8s1gyj2ar9q2gf5346sgdv6jv8hj7aw0hpl2gs5f0s6b"; 26 }; 27 28 # Python 2.x is not supported. 29 disabled = !isPy3k; 30 31 nativeBuildInputs = [ 32 meson 33 ninja 34 pkg-config 35 python3 36 gobject-introspection 37 gst-plugins-base 38 ]; 39 40 propagatedBuildInputs = [ 41 gst-plugins-base 42 pygobject3 43 ]; 44 45 mesonFlags = [ 46 "-Dpygi-overrides-dir=${placeholder "out"}/${python3.sitePackages}/gi/overrides" 47 ]; 48 49 doCheck = true; 50 51 # TODO: Meson setup hook does not like buildPythonPackage 52 # https://github.com/NixOS/nixpkgs/issues/47390 53 installCheckPhase = "meson test --print-errorlogs"; 54 55 meta = with lib; { 56 homepage = "https://gstreamer.freedesktop.org"; 57 description = "Python bindings for GStreamer"; 58 license = licenses.lgpl2Plus; 59 }; 60}