gajim: 0.16.9 -> 1.0.0

Massive update.
This commit is contained in:
Nikolay Amiantov 2018-03-21 04:08:59 +03:00
parent cf981d3e2b
commit eda6b9553b
2 changed files with 39 additions and 115 deletions

View File

@ -1,139 +1,60 @@
{ stdenv, fetchurl, autoreconfHook, python, intltool, pkgconfig, libX11 { buildPythonApplication, lib, fetchurl, gettext, wrapGAppsHook
, ldns, pythonPackages , python, gtk3, gobjectIntrospection
, nbxmpp, pyasn1, pygobject3, dbus-python, pillow
, enableJingle ? true, farstream ? null, gst-plugins-bad ? null , enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly
, libnice ? null , enableE2E ? true, pycrypto, python-gnupg
, enableE2E ? true , enableSecrets ? true, libsecret
, enableRST ? true , enableRST ? true, docutils
, enableSpelling ? true, gtkspell2 ? null , enableSpelling ? true, gspell
, enableNotifications ? false , enableUPnP ? true, gupnp-igd
, enableOmemoPluginDependencies ? true , enableOmemoPluginDependencies ? true, python-axolotl, qrcode
, extraPythonPackages ? pkgs: [] , extraPythonPackages ? pkgs: [], pythonPackages
}: }:
assert enableJingle -> farstream != null && gst-plugins-bad != null with lib;
&& libnice != null;
assert enableE2E -> pythonPackages.pycrypto != null;
assert enableRST -> pythonPackages.docutils != null;
assert enableSpelling -> gtkspell2 != null;
assert enableNotifications -> pythonPackages.notify != null;
with stdenv.lib; buildPythonApplication rec {
stdenv.mkDerivation rec {
name = "gajim-${version}"; name = "gajim-${version}";
majorVersion = "0.16"; majorVersion = "1.0";
version = "${majorVersion}.9"; version = "${majorVersion}.0";
src = fetchurl { src = fetchurl {
name = "${name}.tar.bz2";
url = "https://dev.gajim.org/gajim/gajim/repository/archive.tar.bz2?"
+ "ref=${name}";
sha256 = "121dh906zya9n7npyk7b5xama0z3ycy9jl7l5jm39pc86h1winh3";
};
# Needed for Plugin Installer
release = fetchurl {
url = "https://gajim.org/downloads/${majorVersion}/gajim-${version}.tar.bz2"; url = "https://gajim.org/downloads/${majorVersion}/gajim-${version}.tar.bz2";
sha256 = "0v08zdvpqaig0wxpxn1l8rsj3wr3fqvnagn8cnvch17vfqv9gcr1"; sha256 = "10da4imfldj04917h54vrmg70a1d832jd8p6386paa5jqzf5qk20";
}; };
postUnpack = ''
tar -xaf $release
cp -r ${name}/plugins/plugin_installer gajim-${name}-*/plugins
rm -rf ${name}
'';
patches = let
# An attribute set of revisions to apply from the upstream repository.
cherries = {
#example-fix = {
# rev = "<replace-with-git-revsion>";
# sha256 = "<replace-with-sha256>";
#};
};
in (mapAttrsToList (name: { rev, sha256 }: fetchurl {
name = "gajim-${name}.patch";
url = "https://dev.gajim.org/gajim/gajim/commit/${rev}.diff";
inherit sha256;
}) cherries);
postPatch = ''
sed -i -e '0,/^[^#]/ {
/^[^#]/i export \\\
GST_PLUGIN_PATH="'"\$GST_PLUGIN_PATH''${GST_PLUGIN_PATH:+:}${""
}$GST_PLUGIN_PATH"'"
}' scripts/gajim.in
# requires network access
echo "" > test/integration/test_resolver.py
# We want to run tests in installCheckPhase rather than checkPhase to test
# whether the *installed* version of Gajim works rather than just whether it
# works in the unpacked source tree.
sed -i -e '/sys\.path\.insert.*gajim_root.*\/src/d' test/lib/__init__.py
'' + optionalString enableSpelling ''
sed -i -e 's|=.*find_lib.*|= "${gtkspell2}/lib/libgtkspell.so"|' \
src/gtkspell.py
'';
buildInputs = [ buildInputs = [
python libX11 gobjectIntrospection gtk3
] ++ optionals enableJingle [ farstream gst-plugins-bad libnice ]; ] ++ optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly ]
++ optional enableSecrets libsecret
++ optional enableSpelling gspell
++ optional enableUPnP gupnp-igd;
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook pythonPackages.wrapPython intltool pkgconfig gettext wrapGAppsHook
]; ];
autoreconfPhase = '' propagatedBuildInputs = [
sed -e 's/which/type -P/;s,\./configure,:,' autogen.sh | bash nbxmpp pyasn1 pygobject3 dbus-python pillow
] ++ optionals enableE2E [ pycrypto python-gnupg ]
++ optional enableRST docutils
++ optionals enableOmemoPluginDependencies [ python-axolotl qrcode ]
++ extraPythonPackages pythonPackages;
checkPhase = ''
${python.interpreter} test/runtests.py
''; '';
propagatedBuildInputs = with pythonPackages; [ # Tests try to use GTK+ which fails.
libasyncns doCheck = false;
pygobject2 pyGtkGlade
pyasn1
pyxdg
nbxmpp
pyopenssl dbus-python
] ++ optional enableE2E pythonPackages.pycrypto
++ optional enableRST pythonPackages.docutils
++ optional enableNotifications pythonPackages.notify
++ optionals enableOmemoPluginDependencies (with pythonPackages; [
cryptography python-axolotl python-axolotl-curve25519 qrcode
]) ++ extraPythonPackages pythonPackages;
postFixup = ''
install -m 644 -t "$out/share/gajim/icons/hicolor" \
"icons/hicolor/index.theme"
buildPythonPath "$out"
for i in $out/bin/*; do
name="$(basename "$i")"
if [ "$name" = "gajim-history-manager" ]; then
name="history_manager"
fi
patchPythonScript "$out/share/gajim/src/$name.py"
done
'';
doInstallCheck = true;
installCheckPhase = ''
PYTHONPATH="test:$out/share/gajim/src:''${PYTHONPATH:+:}$PYTHONPATH" \
make test_nogui
'';
enableParallelBuilding = true;
meta = { meta = {
homepage = http://gajim.org/; homepage = http://gajim.org/;
description = "Jabber client written in PyGTK"; description = "Jabber client written in PyGTK";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = [ maintainers.raskin maintainers.aszlig ]; maintainers = with maintainers; [ raskin aszlig abbradar ];
downloadPage = "http://gajim.org/downloads.php"; downloadPage = "http://gajim.org/downloads.php";
updateWalker = true; updateWalker = true;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -20289,7 +20289,10 @@ with pkgs;
foomatic-filters = callPackage ../misc/drivers/foomatic-filters {}; foomatic-filters = callPackage ../misc/drivers/foomatic-filters {};
gajim = callPackage ../applications/networking/instant-messengers/gajim { }; gajim = python3.pkgs.callPackage ../applications/networking/instant-messengers/gajim {
inherit (gst_all_1) gstreamer gst-plugins-base gst-libav gst-plugins-ugly;
inherit (gnome3) gspell;
};
gammu = callPackage ../applications/misc/gammu { }; gammu = callPackage ../applications/misc/gammu { };