about summary refs log tree commit diff
path: root/pkgs/development/python-modules/gst-python
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-08-13 21:46:01 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2017-08-13 21:48:19 +0200
commitd0d87242619e5649078739e34afcdf05f3a52cac (patch)
tree06a966ab44296b4c3a9102aa232b423a397719e5 /pkgs/development/python-modules/gst-python
parentf91355443282244ce78292b77d88a09e4ff7bb5d (diff)
downloadnixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar.gz
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar.bz2
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar.lz
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar.xz
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.tar.zst
nixlib-d0d87242619e5649078739e34afcdf05f3a52cac.zip
python.pkgs.gst-python: move expression
Diffstat (limited to 'pkgs/development/python-modules/gst-python')
-rw-r--r--pkgs/development/python-modules/gst-python/default.nix43
-rw-r--r--pkgs/development/python-modules/gst-python/different-path-with-pygobject.patch20
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix
new file mode 100644
index 000000000000..9a4a19d59611
--- /dev/null
+++ b/pkgs/development/python-modules/gst-python/default.nix
@@ -0,0 +1,43 @@
+{ fetchurl, stdenv, pkgconfig, python, pygobject3
+, gst-plugins-base, ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-python";
+  version = "1.10.4";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    urls = [
+      "${meta.homepage}/src/gst-python/${name}.tar.xz"
+      "mirror://gentoo/distfiles/${name}.tar.xz"
+      ];
+    sha256 = "04l2hvvz9b0f3nyds1k3yfk5di8a91fpr6maj19c11mwp1s82l2r";
+  };
+
+  patches = [ ./different-path-with-pygobject.patch ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkgconfig python ];
+
+  # XXX: in the Libs.private field of python3.pc
+  buildInputs = [ ncurses ];
+
+  preConfigure = ''
+    export configureFlags="$configureFlags --with-pygi-overrides-dir=$out/lib/${python.sitePackages}/gi/overrides"
+  '';
+
+  propagatedBuildInputs = [ gst-plugins-base pygobject3 ];
+
+  # Needed for python.buildEnv
+  passthru.pythonPath = [];
+
+  meta = {
+    homepage = http://gstreamer.freedesktop.org;
+
+    description = "Python bindings for GStreamer";
+
+    license = stdenv.lib.licenses.lgpl2Plus;
+  };
+}
diff --git a/pkgs/development/python-modules/gst-python/different-path-with-pygobject.patch b/pkgs/development/python-modules/gst-python/different-path-with-pygobject.patch
new file mode 100644
index 000000000000..7326b3630f70
--- /dev/null
+++ b/pkgs/development/python-modules/gst-python/different-path-with-pygobject.patch
@@ -0,0 +1,20 @@
+diff -Nru gst-python-1.2.0-orig/gi/overrides/Makefile.in gst-python-1.2.0/gi/overrides/Makefile.in
+--- gst-python-1.2.0-orig/gi/overrides/Makefile.in	2014-03-22 21:47:56.235364405 +0800
++++ gst-python-1.2.0/gi/overrides/Makefile.in	2014-03-22 21:48:28.737958066 +0800
+@@ -356,7 +356,7 @@
+ 
+ # We install everything in the gi/overrides folder
+ pygioverridesdir = $(PYGI_OVERRIDES_DIR)
+-pygioverrides_PYTHON = Gst.py GstPbutils.py
++pygioverrides_PYTHON = Gst.py GstPbutils.py __init__.py
+ pygioverridesexecdir = $(PYGI_OVERRIDES_DIR)
+ EXTRA_DIST = Gst.py
+ INCLUDES = $(PYTHON_INCLUDES)
+diff -Nru gst-python-1.2.0-orig/gi/overrides/__init__.py gst-python-1.2.0/gi/overrides/__init__.py
+--- gst-python-1.2.0-orig/gi/overrides/__init__.py	1970-01-01 08:00:00.000000000 +0800
++++ gst-python-1.2.0/gi/overrides/__init__.py	2014-03-22 21:48:15.442124287 +0800
+@@ -0,0 +1,4 @@
++from pkgutil import extend_path
++
++__path__ = extend_path(__path__, __name__)
++print(__path__, __name__)