2016-02-19 13:12:11 +01:00
|
|
|
{ stdenv, fetchurl, itstool, buildPythonApplication, python27, intltool, makeWrapper
|
2015-01-25 08:59:05 +01:00
|
|
|
, libxml2, pygobject3, gobjectIntrospection, gtk3, gnome3, pycairo, cairo
|
|
|
|
}:
|
2015-01-21 20:59:57 +01:00
|
|
|
|
2010-04-06 21:39:29 +02:00
|
|
|
|
2011-01-20 23:07:49 +01:00
|
|
|
let
|
2015-07-24 19:03:11 +02:00
|
|
|
minor = "3.14";
|
|
|
|
version = "${minor}.0";
|
2011-01-20 23:07:49 +01:00
|
|
|
in
|
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
buildPythonApplication rec {
|
2011-01-20 23:07:49 +01:00
|
|
|
name = "meld-${version}";
|
2015-01-21 20:59:57 +01:00
|
|
|
namePrefix = "";
|
2010-04-06 21:39:29 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-07-14 04:23:06 +02:00
|
|
|
url = "mirror://gnome/sources/meld/${minor}/meld-${version}.tar.xz";
|
2015-07-24 19:03:11 +02:00
|
|
|
sha256 = "0g0h9wdr6nqdalqkz4r037569apw253cklwr17x0zjc7nwv2j3j3";
|
2010-04-06 21:39:29 +02:00
|
|
|
};
|
|
|
|
|
2015-01-25 08:59:05 +01:00
|
|
|
buildInputs = [
|
|
|
|
python27 intltool makeWrapper itstool libxml2
|
|
|
|
gnome3.gtksourceview gnome3.gsettings_desktop_schemas pycairo cairo
|
2015-07-24 19:03:11 +02:00
|
|
|
gnome3.defaultIconTheme
|
2015-01-25 08:59:05 +01:00
|
|
|
];
|
2015-01-21 20:59:57 +01:00
|
|
|
propagatedBuildInputs = [ gobjectIntrospection pygobject3 gtk3 ];
|
2010-04-06 21:39:29 +02:00
|
|
|
|
2015-01-21 20:59:57 +01: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"
|
|
|
|
|
2015-03-01 12:51:36 +01:00
|
|
|
mkdir -p $out/share/gsettings-schemas/$name
|
|
|
|
mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
2015-01-21 20:59:57 +01:00
|
|
|
wrapProgram $out/bin/meld \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
2015-07-24 19:03:11 +02:00
|
|
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:$out/share" \
|
|
|
|
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
|
2010-04-06 21:39:29 +02:00
|
|
|
'';
|
|
|
|
|
2015-01-21 20:59:57 +01:00
|
|
|
patchPhase = ''
|
2015-07-24 19:03:11 +02:00
|
|
|
patchShebangs bin/meld
|
2010-04-06 21:39:29 +02:00
|
|
|
'';
|
|
|
|
|
2015-01-21 20:59:57 +01:00
|
|
|
pythonPath = [ gtk3 ];
|
|
|
|
|
2013-09-02 21:57:08 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-04-06 21:39:29 +02:00
|
|
|
description = "Visual diff and merge tool";
|
2015-07-24 19:03:11 +02:00
|
|
|
homepage = http://meldmerge.org/;
|
2015-01-21 20:59:57 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-09-09 15:21:04 +02:00
|
|
|
platforms = platforms.linux ++ stdenv.lib.platforms.darwin;
|
2010-04-06 21:39:29 +02:00
|
|
|
};
|
|
|
|
}
|