From c22b243b3b8be98f3ec8aed817e7f490d8250d27 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 21 Dec 2016 00:36:41 +0300 Subject: gnome2.gnome_python: use standard build system --- .../gnome-2/bindings/gnome-python/default.nix | 39 +++++++++------------- 1 file 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 ]; }; } -- cgit 1.4.1