gnome2.gnome_python: use standard build system

This commit is contained in:
Nikolay Amiantov 2016-12-21 00:36:41 +03:00
parent 800020446e
commit c22b243b3b

View File

@ -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; with stdenv.lib;
let let
inherit (pythonPackages) python pygobject2 pygtk dbus-python; inherit (python2.pkgs) python pygobject2 pygtk dbus-python;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
version = "2.28"; version = "2.28";
name = "gnome-python-${version}.1"; name = "gnome-python-${version}.1";
@ -13,30 +13,21 @@ in stdenv.mkDerivation rec {
sha256 = "759ce9344cbf89cf7f8449d945822a0c9f317a494f56787782a901e4119b96d8"; 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 # gnome-python expects that .pth file is already installed by PyGTK in the
configurePhase = '' # same directory. This is not the case for Nix.
sed -e "s@{PYTHONDIR}/gtk-2.0@{PYTHONDIR}/@" -i gconf/wscript postInstall = ''
python waf configure --prefix=$out echo "gtk-2.0" > $out/${python2.sitePackages}/${name}.pth
''; '';
buildPhase = '' meta = with stdenv.lib; {
python waf build homepage = "http://pygtk.org/";
''; description = "Python wrapper for GNOME libraries";
platforms = platforms.linux;
installPhase = '' licenses = licenses.lgpl2;
python waf install maintainers = with maintainers; [ qknight ];
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 ];
}; };
} }