guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] gnu: Add gst-python.


From: 宋文武
Subject: [PATCH 4/4] gnu: Add gst-python.
Date: Sun, 6 Mar 2016 15:07:58 +0800

* gnu/packages/gstreamer.scm (python-gst, python2-gst): New variables.
---
 gnu/packages/gstreamer.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 5b348b1..b19ea81 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -24,6 +24,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages bison)
@@ -400,3 +401,60 @@ distribution problems in some jurisdictions, e.g. due to 
patent threats.")
      "This GStreamer plugin supports a large number of audio and video
 compression formats through the use of the libav library.")
     (license gpl2+)))
+
+(define-public python-gst
+  (package
+    (name "python-gst")
+    (version "1.6.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://gstreamer.freedesktop.org/src/gst-python/";
+                    "gst-python-" version ".tar.xz"))
+              (sha256
+               (base32
+                "09ci5zvr7lms7mvgbjgsjwaxcl4nq45n1g9pdwnqmx3rf0qkwxjf"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (let ((python-sitedir
+              ;; XXX: make this a package property?
+              ,(string-append "lib/python"
+                              (version-major+minor (package-version python))
+                              "/site-packages")))
+         (list (string-append
+                "--with-pygi-overrides-dir=" %output "/" python-sitedir
+                "/gi/overrides")))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)))
+    (propagated-inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("python-pygobject" ,python-pygobject)))
+    (home-page "http://gstreamer.freedesktop.org/";)
+    (synopsis "GStreamer GObject Introspection overrides for Python")
+    (description
+     "This package contains GObject Introspection overrides for Python that can
+be used by Python applications using GStreamer.")
+    (license lgpl2.1+)
+    (properties `((python2-variant . ,(delay python2-gst))))))
+
+(define-public python2-gst
+  (package (inherit python-gst)
+    (name "python2-gst")
+    (arguments
+     `(#:configure-flags
+       (let ((python-sitedir
+              ;; XXX: make this a package property?
+              ,(string-append "lib/python"
+                              (version-major+minor (package-version python-2))
+                              "/site-packages")))
+         (list (string-append
+                "--with-pygi-overrides-dir=" %output "/" python-sitedir
+                "/gi/overrides")))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python-2)))
+    (propagated-inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("python-pygobject" ,python2-pygobject)))))
-- 
2.6.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]