2019-01-13 21:05:01 +00:00
|
|
|
{ stdenv, fetchurl, itstool, python3, intltool, wrapGAppsHook
|
|
|
|
, libxml2, gobject-introspection, gtk3, gtksourceview, gnome3
|
2019-04-02 21:37:00 +01:00
|
|
|
, gsettings-desktop-schemas, dbus, xvfb_run
|
2015-01-25 07:59:05 +00:00
|
|
|
}:
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-03-03 00:45:16 +00:00
|
|
|
pname = "meld";
|
2020-02-18 12:14:40 +00:00
|
|
|
version = "3.20.2";
|
2010-04-06 20:39:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-01-13 21:05:01 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-02-18 12:14:40 +00:00
|
|
|
sha256 = "0a0x156zr3w2yg0rnhwy39giy3xnfm6sqcfa4xcw4i6ahvwqa2dc";
|
2010-04-06 20:39:29 +01:00
|
|
|
};
|
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
intltool itstool libxml2 gobject-introspection wrapGAppsHook
|
|
|
|
];
|
2015-01-25 07:59:05 +00:00
|
|
|
buildInputs = [
|
2019-04-02 21:37:00 +01:00
|
|
|
gtk3 gtksourceview gsettings-desktop-schemas gnome3.adwaita-icon-theme
|
2019-03-13 21:04:31 +00:00
|
|
|
gobject-introspection # fixes https://github.com/NixOS/nixpkgs/issues/56943 for now
|
2015-01-25 07:59:05 +00:00
|
|
|
];
|
2019-01-13 21:05:01 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [ pygobject3 pycairo ];
|
2019-03-02 12:52:49 +00:00
|
|
|
checkInputs = [ xvfb_run python3.pkgs.pytest dbus gtksourceview gtk3 ];
|
2010-04-06 20:39:29 +01:00
|
|
|
|
2015-01-21 19:59:57 +00:00
|
|
|
installPhase = ''
|
2019-01-13 21:05:01 +00:00
|
|
|
runHook preInstall
|
|
|
|
${python3.interpreter} setup.py install --prefix=$out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
# Unable to create user data directory '/homeless-shelter/.local/share' for storing the recently used files list: Permission denied
|
|
|
|
mkdir test-home
|
|
|
|
export HOME=$(pwd)/test-home
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
# GLib.GError: gtk-icon-theme-error-quark: Icon 'meld-change-apply-right' not present in theme Adwaita
|
|
|
|
export XDG_DATA_DIRS="$out/share:$XDG_DATA_DIRS"
|
2015-03-01 11:51:36 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
# ModuleNotFoundError: No module named 'meld'
|
|
|
|
export PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
|
2010-04-06 20:39:29 +01:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
# Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
|
|
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
|
|
|
py.test
|
2015-01-21 19:59:57 +00:00
|
|
|
|
2019-01-13 21:05:01 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
2017-12-28 11:29:12 +00:00
|
|
|
|
2018-03-03 00:45:16 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://meldmerge.org/";
|
2019-01-13 21:05:01 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2019-09-14 11:15:46 +01:00
|
|
|
maintainers = with maintainers; [ jtojnar mimame ];
|
2010-04-06 20:39:29 +01:00
|
|
|
};
|
|
|
|
}
|