diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers')
4 files changed, 112 insertions, 121 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; }; } diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index 74dc36bc7ac0..327b02b23526 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,5 +1,6 @@ -{ stdenv, fetchurl, pkgconfig, glib, openssl, expat, libmesode -, ncurses, libotr, curl, readline, libuuid +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl +, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid +, cmocka, libmicrohttpd, stabber, expat, libmesode , autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null , notifySupport ? false, libnotify ? null, gdk_pixbuf ? null @@ -20,18 +21,22 @@ stdenv.mkDerivation rec { name = "profanity-${version}"; version = "0.5.1"; - src = fetchurl { - url = "http://www.profanity.im/profanity-${version}.tar.gz"; - sha256 = "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3"; + src = fetchFromGitHub { + owner = "boothj5"; + repo = "profanity"; + rev = "${version}"; + sha256 = "1ppr02wivhlrqr62r901clnycna8zpn6kr7n5rw8y3zfw21ny17z"; }; + patches = [ ./patches/packages-osx.patch ./patches/undefined-macros.patch ]; + enableParallelBuilding = true; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ autoreconfHook glibcLocales pkgconfig ]; buildInputs = [ - readline libuuid libmesode - glib openssl expat ncurses libotr curl + expect readline libuuid glib openssl expat ncurses libotr + curl libmesode cmocka libmicrohttpd stabber ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ] ++ optionals notifySupport [ libnotify gdk_pixbuf ] ++ optionals traySupport [ gnome2.gtk ] @@ -45,6 +50,20 @@ stdenv.mkDerivation rec { ++ optionals pgpSupport [ "--enable-pgp" ] ++ optionals pythonPluginSupport [ "--enable-python-plugins" ]; + preAutoreconf = '' + mkdir m4 + ''; + + doCheck = true; + + LC_ALL = "en_US.utf8"; + + NIX_CFLAGS_COMPILE = [ ] + ++ optionals pythonPluginSupport [ "-I${python}/include/${python.libPrefix}" ]; + + LDFLAGS = [ ] + ++ optionals pythonPluginSupport [ "-L${python}/lib" "-lpython${python.majorVersion}m" ]; + meta = { description = "A console based XMPP client"; longDescription = '' diff --git a/pkgs/applications/networking/instant-messengers/profanity/patches/packages-osx.patch b/pkgs/applications/networking/instant-messengers/profanity/patches/packages-osx.patch new file mode 100644 index 000000000000..77bfc5e78bd0 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/profanity/patches/packages-osx.patch @@ -0,0 +1,11 @@ +diff --git a/configure.ac b/configure.ac +index 1e55b1cc..0832a387 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,6 @@ AC_CANONICAL_HOST + PLATFORM="unknown" + AS_CASE([$host_os], + [freebsd*], [PLATFORM="freebsd"], +- [darwin*], [PLATFORM="osx"], + [cygwin], [PLATFORM="cygwin"], + [PLATFORM="nix"]) diff --git a/pkgs/applications/networking/instant-messengers/profanity/patches/undefined-macros.patch b/pkgs/applications/networking/instant-messengers/profanity/patches/undefined-macros.patch new file mode 100644 index 000000000000..9ef4e7bebe54 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/profanity/patches/undefined-macros.patch @@ -0,0 +1,40 @@ +diff --git a/configure.ac b/configure.ac +index 1e55b1cc..0832a387 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,12 +81,12 @@ elif test "x$enable_python_plugins" != xno; then + AM_CONDITIONAL([BUILD_PYTHON_API], [true]) + AC_DEFINE([HAVE_PYTHON], [1], [Python support]) + else +- if test "x$enable_python_plugins" = xyes; then +- AC_MSG_ERROR([Python not found, cannot enable Python plugins.]) +- else +- AM_CONDITIONAL([BUILD_PYTHON_API], [false]) +- AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.]) +- fi ++ AS_IF( ++ [test "x$enable_python_plugins" = xyes], ++ [], ++ [AM_CONDITIONAL([BUILD_PYTHON_API], [false]) ++ AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.])] ++ ) + fi + AS_IF([test "x$PLATFORM" = xosx], [rm -f Python.framework]) + else +@@ -107,7 +105,7 @@ else + [AM_CONDITIONAL([BUILD_C_API], [true]) LIBS="$LIBS -ldl" AC_DEFINE([HAVE_C], [1], [C support])], + [AS_IF( + [test "x$enable_c_plugins" = xyes], +- [AC_MSG_ERROR([dl library needed to run C plugins])], ++ [], + [AM_CONDITIONAL([BUILD_C_API], [false])]) + ]) + else +@@ -116,7 +114,6 @@ else + fi + + # threading +-ACX_PTHREAD([], [AC_MSG_ERROR([pthread is required])]) + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + AS_IF([test "x$PTHREAD_CC" != x], [ CC="$PTHREAD_CC" ]) |