3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/meld/default.nix
2018-01-08 07:37:45 +00:00

54 lines
1.5 KiB
Nix

{ stdenv, fetchurl, itstool, python3Packages, intltool, wrapGAppsHook
, libxml2, gobjectIntrospection, gtk3, gnome3, cairo, file
}:
let
minor = "3.18";
version = "${minor}.0";
inherit (python3Packages) python buildPythonApplication pycairo pygobject3;
in buildPythonApplication rec {
name = "meld-${version}";
src = fetchurl {
url = "mirror://gnome/sources/meld/${minor}/meld-${version}.tar.xz";
sha256 = "0gi2jzgsrd5q2icyp6wphbn532ddg82nxhfxlffkniy7wnqmi0c4";
};
buildInputs = [
intltool wrapGAppsHook itstool libxml2
gnome3.gtksourceview gnome3.gsettings_desktop_schemas pycairo cairo
gnome3.defaultIconTheme gnome3.dconf file
];
propagatedBuildInputs = [ gobjectIntrospection pygobject3 gtk3 ];
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"
mkdir -p $out/share/gsettings-schemas/$name
mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/
'';
patchPhase = ''
patchShebangs bin/meld
'';
pythonPath = [ gtk3 ];
doCheck = false;
meta = with stdenv.lib; {
description = "Visual diff and merge tool";
homepage = http://meldmerge.org/;
license = stdenv.lib.licenses.gpl2;
platforms = platforms.linux ++ stdenv.lib.platforms.darwin;
maintainers = [ maintainers.mimadrid ];
};
}