about summary refs log tree commit diff
path: root/pkgs/desktops/gnome-2
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-12-21 00:36:41 +0300
committerNikolay Amiantov <ab@fmap.me>2016-12-22 01:35:10 +0300
commitc22b243b3b8be98f3ec8aed817e7f490d8250d27 (patch)
treefa3536d90228c07a702e744ef21af170c1ddad8e /pkgs/desktops/gnome-2
parent800020446e2842b48faa41b43b9ae874c85848fb (diff)
downloadnixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar.gz
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar.bz2
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar.lz
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar.xz
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.tar.zst
nixlib-c22b243b3b8be98f3ec8aed817e7f490d8250d27.zip
gnome2.gnome_python: use standard build system
Diffstat (limited to 'pkgs/desktops/gnome-2')
-rw-r--r--pkgs/desktops/gnome-2/bindings/gnome-python/default.nix39
1 files changed, 15 insertions, 24 deletions
diff --git a/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix b/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
index 94ce68f9cb20..d7861285cb1e 100644
--- a/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
+++ b/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, pythonPackages, pkgconfig, libgnome, GConf, glib, gtk, gnome_vfs}:
+{ stdenv, fetchurl, python2, pkgconfig, libgnome, GConf, glib, gtk, gnome_vfs }:
 
 with stdenv.lib;
 
 let
-  inherit (pythonPackages) python pygobject2 pygtk dbus-python;
+  inherit (python2.pkgs) python pygobject2 pygtk dbus-python;
 in stdenv.mkDerivation rec {
   version = "2.28";
   name = "gnome-python-${version}.1";
@@ -13,30 +13,21 @@ in stdenv.mkDerivation rec {
     sha256 = "759ce9344cbf89cf7f8449d945822a0c9f317a494f56787782a901e4119b96d8";
   };
 
-  phases = "unpackPhase configurePhase buildPhase installPhase";
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ python glib gtk GConf libgnome gnome_vfs ];
+  propagatedBuildInputs = [ pygobject2 pygtk dbus-python ];
 
-  # WAF is probably the biggest crap on this planet, btw i removed the /gtk-2.0 path thingy
-  configurePhase = ''
-    sed -e "s@{PYTHONDIR}/gtk-2.0@{PYTHONDIR}/@" -i gconf/wscript
-    python waf configure --prefix=$out
+  # gnome-python expects that .pth file is already installed by PyGTK in the
+  # same directory. This is not the case for Nix.
+  postInstall = ''
+    echo "gtk-2.0" > $out/${python2.sitePackages}/${name}.pth
   '';
 
-  buildPhase = ''
-    python waf build
-  '';
-
-  installPhase = ''
-    python waf install
-    cp bonobo/*.{py,defs} $out/share/pygtk/2.0/defs/
-  '';
-
-  buildInputs = [ python pkgconfig pygobject2 pygtk glib gtk GConf libgnome dbus-python gnome_vfs ];
-
-  doCheck = false;
-
-  meta = {
-    homepage = "http://projects.gnome.org/gconf/";
-    description = "Python wrapper for gconf";
-    maintainers = [ stdenv.lib.maintainers.qknight ];
+  meta = with stdenv.lib; {
+    homepage = "http://pygtk.org/";
+    description = "Python wrapper for GNOME libraries";
+    platforms = platforms.linux;
+    licenses = licenses.lgpl2;
+    maintainers = with maintainers; [ qknight ];
   };
 }