From 13928c9892c2266f9f94e9f270cd87aa29101726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Mar 2014 20:55:58 +0800 Subject: [PATCH 1/5] clutter-gtk: enable gobject introspection --- pkgs/development/libraries/clutter-gtk/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/clutter-gtk/default.nix b/pkgs/development/libraries/clutter-gtk/default.nix index 040123d4276..3614d149489 100644 --- a/pkgs/development/libraries/clutter-gtk/default.nix +++ b/pkgs/development/libraries/clutter-gtk/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, pkgconfig, clutter, gtk3 }: +{ fetchurl, stdenv, pkgconfig, gobjectIntrospection, clutter, gtk3 }: stdenv.mkDerivation rec { name = "clutter-gtk-1.4.4"; @@ -9,9 +9,7 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ clutter gtk3 ]; - nativeBuildInputs = [ pkgconfig ]; - - configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK + nativeBuildInputs = [ pkgconfig gobjectIntrospection ]; postBuild = "rm -rf $out/share/gtk-doc"; From 6f689beeeb32b03d19ff07954bf482c6ee6dc782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Mar 2014 20:56:29 +0800 Subject: [PATCH 2/5] gst-editing-services: enable gobject introspection --- pkgs/development/libraries/gstreamer/ges/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index 94d3688eb1c..90233abe31c 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python +{ stdenv, fetchurl, pkgconfig, python, gobjectIntrospection , gnonlin, libxml2 }: @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { sha256 = "1n7nw8rqvwna9af55lggah44gdvfgld1igvgaya8glc37wpq89b0"; }; - nativeBuildInputs = [ pkgconfig python ]; + nativeBuildInputs = [ pkgconfig python gobjectIntrospection ]; propagatedBuildInputs = [ gnonlin libxml2 ]; } From 36af50f69a1f42d643c3acd8362b3c58db696a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Mar 2014 22:19:44 +0800 Subject: [PATCH 3/5] gst-python: make it works --- .../libraries/gstreamer/python/default.nix | 2 ++ .../different-path-with-pygobject.patch | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/libraries/gstreamer/python/different-path-with-pygobject.patch diff --git a/pkgs/development/libraries/gstreamer/python/default.nix b/pkgs/development/libraries/gstreamer/python/default.nix index 843822b0748..9a526de05b1 100644 --- a/pkgs/development/libraries/gstreamer/python/default.nix +++ b/pkgs/development/libraries/gstreamer/python/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { sha256 = "09c6yls8ipbmwimdjr7xi3hvf2xa1xn1pv07855r7wfyzas1xbl1"; }; + patches = [ ./different-path-with-pygobject.patch ]; + buildInputs = [ pkgconfig gst-plugins-base pygtk pygobject3 ] ; diff --git a/pkgs/development/libraries/gstreamer/python/different-path-with-pygobject.patch b/pkgs/development/libraries/gstreamer/python/different-path-with-pygobject.patch new file mode 100644 index 00000000000..7326b3630f7 --- /dev/null +++ b/pkgs/development/libraries/gstreamer/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__) From 6a981b514198d9b615be065e7b7fa4a2adbeb890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Mar 2014 22:33:35 +0800 Subject: [PATCH 4/5] add pitivi 0.93 --- pkgs/applications/video/pitivi/default.nix | 52 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/applications/video/pitivi/default.nix diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix new file mode 100644 index 00000000000..d6a0c0e5212 --- /dev/null +++ b/pkgs/applications/video/pitivi/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchurl, pkgconfig, intltool, itstool, makeWrapper +, pythonPackages, gst, clutter-gst, clutter-gtk +, gobjectIntrospection, clutter, gtk3, librsvg +}: + +let + version = "0.93"; +in stdenv.mkDerivation rec { + name = "pitivi-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/pitivi/${version}/${name}.tar.xz"; + sha256 = "0z89dwrd7akhkap270i372yszqib8yqcymv78lhdmn3a8bsa7jhp"; + }; + + meta = with stdenv.lib; { + description = "Non-Linear video editor utilizing the power of GStreamer"; + homepage = "http://pitivi.org/"; + longDescription = '' + Pitivi is a video editor built upon the GStreamer Editing Services. + It aims to be an intuitive and flexible application + that can appeal to newbies and professionals alike. + ''; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ iyzsong ]; + }; + + nativeBuildInputs = [ pkgconfig intltool itstool makeWrapper ]; + + buildInputs = [ + gobjectIntrospection clutter-gst clutter-gtk librsvg + ] ++ (with gst; [ + gst-python gst-editing-services + gst-plugins-base gst-plugins-good + gst-plugins-bad gst-plugins-ugly gst-libav + ]) ++ (with pythonPackages; [ + python pygobject3 pyxdg numpy pycairo sqlite3 + ]); + + postInstall = with stdenv.lib; with gst; let + libraryPath = makeLibraryPath [ + gstreamer gst-editing-services + clutter-gst clutter-gtk clutter gtk3 + ]; + in '' + wrapProgram "$out/bin/pitivi" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --prefix LD_LIBRARY_PATH : "${libraryPath}" \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 10df9bbd986..dad2bf5056a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1630,6 +1630,11 @@ let parted = callPackage ../tools/misc/parted { hurd = null; }; + pitivi = callPackage ../applications/video/pitivi { + gst = gst_all_1; + clutter-gtk = clutter_gtk; + }; + hurdPartedCross = if crossSystem != null && crossSystem.config == "i586-pc-gnu" then (makeOverridable From 96d78a2804ada185f6bb4dc2b51f15853598e251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Mar 2014 23:57:24 +0800 Subject: [PATCH 5/5] pitivi: fix icons --- pkgs/applications/video/pitivi/default.nix | 8 +++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix index d6a0c0e5212..947d2517808 100644 --- a/pkgs/applications/video/pitivi/default.nix +++ b/pkgs/applications/video/pitivi/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, pkgconfig, intltool, itstool, makeWrapper , pythonPackages, gst, clutter-gst, clutter-gtk , gobjectIntrospection, clutter, gtk3, librsvg +, gnome_icon_theme, gnome_icon_theme_symbolic }: let @@ -43,10 +44,15 @@ in stdenv.mkDerivation rec { gstreamer gst-editing-services clutter-gst clutter-gtk clutter gtk3 ]; + + xdgDataDirs = makeSearchPath "share" [ + gtk3 gnome_icon_theme gnome_icon_theme_symbolic + ]; in '' wrapProgram "$out/bin/pitivi" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ --prefix LD_LIBRARY_PATH : "${libraryPath}" \ - --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ + --prefix XDG_DATA_DIRS : "\$XDG_ICON_DIRS:${xdgDataDirs}:$out/share" ''; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dad2bf5056a..c7ba7f800a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1633,6 +1633,7 @@ let pitivi = callPackage ../applications/video/pitivi { gst = gst_all_1; clutter-gtk = clutter_gtk; + inherit (gnome3) gnome_icon_theme gnome_icon_theme_symbolic; }; hurdPartedCross =