2015-01-25 07:59:05 +00:00
|
|
|
{ stdenv, fetchurl, itstool, buildPythonPackage, python27, intltool, makeWrapper
|
|
|
|
, libxml2, pygobject3, gobjectIntrospection, gtk3, gnome3, pycairo, cairo
|
|
|
|
}:
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2010-04-06 20:39:29 +01:00
|
|
|
|
2011-01-20 22:07:49 +00:00
|
|
|
let
|
2015-01-21 19:59:57 +00:00
|
|
|
minor = "3.12";
|
|
|
|
version = "${minor}.3";
|
2011-01-20 22:07:49 +00:00
|
|
|
in
|
|
|
|
|
2015-01-21 19:59:57 +00:00
|
|
|
buildPythonPackage rec {
|
2011-01-20 22:07:49 +00:00
|
|
|
name = "meld-${version}";
|
2015-01-21 19:59:57 +00:00
|
|
|
namePrefix = "";
|
2010-04-06 20:39:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 03:23:06 +01:00
|
|
|
url = "mirror://gnome/sources/meld/${minor}/meld-${version}.tar.xz";
|
2015-01-21 19:59:57 +00:00
|
|
|
sha256 = "1zg6qhm53j0vxmjj3pcj2hwi8c12dxzmlh98zks0jnwhqv2p4dfv";
|
2010-04-06 20:39:29 +01:00
|
|
|
};
|
|
|
|
|
2015-01-25 07:59:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
python27 intltool makeWrapper itstool libxml2
|
|
|
|
gnome3.gtksourceview gnome3.gsettings_desktop_schemas pycairo cairo
|
|
|
|
];
|
2015-01-21 19:59:57 +00:00
|
|
|
propagatedBuildInputs = [ gobjectIntrospection pygobject3 gtk3 ];
|
2010-04-06 20:39:29 +01:00
|
|
|
|
2015-01-21 19:59:57 +00:00
|
|
|
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"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/meld \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${gnome3.gtk3}/lib" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
|
2010-04-06 20:39:29 +01:00
|
|
|
'';
|
|
|
|
|
2015-01-21 19:59:57 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -e 's,#!.*,#!${python27}/bin/python27,' -i bin/meld
|
2010-04-06 20:39:29 +01:00
|
|
|
'';
|
|
|
|
|
2015-01-21 19:59:57 +00:00
|
|
|
pythonPath = [ gtk3 ];
|
|
|
|
|
2013-09-02 20:57:08 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-04-06 20:39:29 +01:00
|
|
|
description = "Visual diff and merge tool";
|
|
|
|
homepage = http://meld.sourceforge.net;
|
2015-01-21 19:59:57 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-09-09 14:21:04 +01:00
|
|
|
platforms = platforms.linux ++ stdenv.lib.platforms.darwin;
|
2010-04-06 20:39:29 +01:00
|
|
|
};
|
|
|
|
}
|