Created
January 21, 2015 19:18
-
-
Save qknight/8ebf19b6aa47fcd6501b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{stdenv, fetchurl, itstool, buildPythonPackage, python27, intltool, scrollkeeper, makeWrapper, libxml2, pygobject3, gobjectIntrospection, gtk3, pygtk, gnome3}: | |
let | |
minor = "3.12"; | |
version = "${minor}.3"; | |
in | |
# Requirements | |
# [x] Python 2.7 (Python 3 not yet supported) | |
# [x] GTK+ 3.6 (3.12 in development) | |
# [x] GLib 2.34 (2.36 in development) | |
# [x] PyGObject 3.8 | |
# [ ] GtkSourceView 3.6 (3.10 in development) | |
buildPythonPackage rec { | |
name = "meld-${version}"; | |
src = fetchurl { | |
url = "mirror://gnome/sources/meld/${minor}/meld-${version}.tar.xz"; | |
sha256 = "1zg6qhm53j0vxmjj3pcj2hwi8c12dxzmlh98zks0jnwhqv2p4dfv"; | |
}; | |
buildInputs = [ python27 intltool scrollkeeper makeWrapper itstool libxml2 pygobject3 gobjectIntrospection gtk3 ]; | |
propagatedBuildInputs = [ gobjectIntrospection pygobject3 gtk3 pygtk]; | |
installPhase = '' | |
mkdir -p "$out/lib/${python27.libPrefix}/site-packages" | |
export PYTHONPATH="$out/lib/${python27.libPrefix}/site-packages:$PYTHONPATH" | |
${python27}/bin/${python27.executable} setup.py install \ | |
--install-lib=$out/lib/${python27.libPrefix}/site-packages \ | |
--prefix="$out" | |
''; | |
patchPhase = '' | |
sed -e 's,#!.*,#!${python27}/bin/python27,' -i bin/meld | |
''; | |
postInstall = '' | |
wrapProgram $out/bin/meld --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ | |
--prefix LD_LIBRARY_PATH : "${gnome3.gtk3}/lib" \ | |
''; | |
meta = with stdenv.lib; { | |
description = "Visual diff and merge tool"; | |
homepage = http://meld.sourceforge.net; | |
license = stdenv.lib.licenses.gpl2; | |
platforms = platforms.linux ++ stdenv.lib.platforms.darwin; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
meld
Cannot import: GTK+
cannot import name Gtk