diff options
author | Nikolay Amiantov <ab@fmap.me> | 2018-03-21 04:08:59 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2018-03-21 04:11:24 +0300 |
commit | eda6b9553b998b2ad4d36e22bd0f2b7a536fd517 (patch) | |
tree | 7affbfe27107bd4aac4af47db78bc56083ba3224 /pkgs/applications/networking/instant-messengers/gajim | |
parent | cf981d3e2b3a7761ff6f050138fc301d19c12862 (diff) | |
download | nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar.gz nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar.bz2 nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar.lz nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar.xz nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.tar.zst nixlib-eda6b9553b998b2ad4d36e22bd0f2b7a536fd517.zip |
gajim: 0.16.9 -> 1.0.0
Massive update.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/gajim')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/gajim/default.nix | 147 |
1 files changed, 34 insertions, 113 deletions
diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index 2f5ea0715680..a60df1ead534 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -1,139 +1,60 @@ -{ stdenv, fetchurl, autoreconfHook, python, intltool, pkgconfig, libX11 -, ldns, pythonPackages - -, enableJingle ? true, farstream ? null, gst-plugins-bad ? null -, libnice ? null -, enableE2E ? true -, enableRST ? true -, enableSpelling ? true, gtkspell2 ? null -, enableNotifications ? false -, enableOmemoPluginDependencies ? true -, extraPythonPackages ? pkgs: [] +{ buildPythonApplication, lib, fetchurl, gettext, wrapGAppsHook +, python, gtk3, gobjectIntrospection +, nbxmpp, pyasn1, pygobject3, dbus-python, pillow +, enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly +, enableE2E ? true, pycrypto, python-gnupg +, enableSecrets ? true, libsecret +, enableRST ? true, docutils +, enableSpelling ? true, gspell +, enableUPnP ? true, gupnp-igd +, enableOmemoPluginDependencies ? true, python-axolotl, qrcode +, extraPythonPackages ? pkgs: [], pythonPackages }: -assert enableJingle -> farstream != null && gst-plugins-bad != null - && libnice != null; -assert enableE2E -> pythonPackages.pycrypto != null; -assert enableRST -> pythonPackages.docutils != null; -assert enableSpelling -> gtkspell2 != null; -assert enableNotifications -> pythonPackages.notify != null; - -with stdenv.lib; +with lib; -stdenv.mkDerivation rec { +buildPythonApplication rec { name = "gajim-${version}"; - majorVersion = "0.16"; - version = "${majorVersion}.9"; + majorVersion = "1.0"; + version = "${majorVersion}.0"; 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"; - 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 = [ - python libX11 - ] ++ optionals enableJingle [ farstream gst-plugins-bad libnice ]; + gobjectIntrospection gtk3 + ] ++ optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly ] + ++ optional enableSecrets libsecret + ++ optional enableSpelling gspell + ++ optional enableUPnP gupnp-igd; nativeBuildInputs = [ - autoreconfHook pythonPackages.wrapPython intltool pkgconfig + gettext wrapGAppsHook ]; - autoreconfPhase = '' - sed -e 's/which/type -P/;s,\./configure,:,' autogen.sh | bash - ''; - - propagatedBuildInputs = with pythonPackages; [ - libasyncns - 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 - ''; + propagatedBuildInputs = [ + nbxmpp pyasn1 pygobject3 dbus-python pillow + ] ++ optionals enableE2E [ pycrypto python-gnupg ] + ++ optional enableRST docutils + ++ optionals enableOmemoPluginDependencies [ python-axolotl qrcode ] + ++ extraPythonPackages pythonPackages; - doInstallCheck = true; - installCheckPhase = '' - PYTHONPATH="test:$out/share/gajim/src:''${PYTHONPATH:+:}$PYTHONPATH" \ - make test_nogui + checkPhase = '' + ${python.interpreter} test/runtests.py ''; - enableParallelBuilding = true; + # Tests try to use GTK+ which fails. + doCheck = false; meta = { homepage = http://gajim.org/; description = "Jabber client written in PyGTK"; license = licenses.gpl3Plus; - maintainers = [ maintainers.raskin maintainers.aszlig ]; + maintainers = with maintainers; [ raskin aszlig abbradar ]; downloadPage = "http://gajim.org/downloads.php"; updateWalker = true; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux; }; } |