Created
January 21, 2015 15:43
-
-
Save qknight/51f1da8ec24325687b78 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, pygtk, python, intltool, scrollkeeper, makeWrapper, libxml2, pygobject3}: | |
let | |
minor = "3.12"; | |
version = "${minor}.3"; | |
in | |
# Requirements | |
# Python 2.7 (Python 3 not yet supported) | |
# GTK+ 3.6 (3.12 in development) | |
# GLib 2.34 (2.36 in development) | |
# 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 = [ pygtk python intltool scrollkeeper makeWrapper itstool libxml2 pygobject3 ]; | |
installPhase = '' | |
mkdir -p "$out/lib/${python.libPrefix}/site-packages" | |
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" | |
${python}/bin/${python.executable} setup.py install \ | |
--install-lib=$out/lib/${python.libPrefix}/site-packages \ | |
--prefix="$out" | |
''; | |
patchPhase = '' | |
sed -e 's,#!.*,#!${python}/bin/python,' -i bin/meld | |
''; | |
postInstall = '' | |
wrapProgram $out/bin/meld --prefix PYTHONPATH : $PYTHONPATH:${pygtk}/lib/${python.libPrefix}/site-packages/gtk-2.0 | |
''; | |
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