diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/pidgin')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/pidgin/default.nix | 52 | ||||
-rw-r--r-- | pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix | 6 |
2 files changed, 24 insertions, 34 deletions
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index a7ea5bee30891..bd6febeaf9d13 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -1,27 +1,18 @@ -{ stdenv, fetchurl, makeWrapper, pkg-config, gtk2, gtk2-x11 -, gtkspell2, aspell -, gst_all_1, startupnotification, gettext -, perlPackages, libxml2, nss, nspr, farstream -, libXScrnSaver, avahi, dbus, dbus-glib, intltool, libidn -, lib, python3, libICE, libXext, libSM -, libgnt, ncurses -, cyrus_sasl ? null -, openssl ? null -, gnutls ? null -, libgcrypt ? null -, plugins, symlinkJoin -, cacert +{ callPackage, stdenv, fetchurl, makeWrapper, pkg-config, gtk2, gtk2-x11, gtkspell2, aspell +, gst_all_1, libstartup_notification, gettext, perlPackages, libxml2, nss +, nspr, farstream, libXScrnSaver, avahi, dbus, dbus-glib, intltool, libidn +, lib, python3, libICE, libXext, libSM, libgnt, ncurses, cyrus_sasl, openssl +, gnutls, libgcrypt, symlinkJoin, cacert, plugins, withOpenssl, withGnutls, withCyrus_sasl ? true }: # FIXME: clean the mess around choosing the SSL library (nss by default) let unwrapped = stdenv.mkDerivation rec { pname = "pidgin"; - majorVersion = "2"; - version = "${majorVersion}.14.8"; + version = "2.14.8"; src = fetchurl { - url = "mirror://sourceforge/pidgin/${pname}-${version}.tar.bz2"; + url = "mirror://sourceforge/pidgin/pidgin-${version}.tar.bz2"; sha256 = "1jjc15pfyw3012q5ffv7q4r88wv07ndqh0wakyxa2k0w4708b01z"; }; @@ -32,7 +23,7 @@ let unwrapped = stdenv.mkDerivation rec { buildInputs = let python-with-dbus = python3.withPackages (pp: with pp; [ dbus-python ]); in [ - aspell startupnotification + aspell libstartup_notification gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good libxml2 nss nspr libXScrnSaver python-with-dbus @@ -40,17 +31,16 @@ let unwrapped = stdenv.mkDerivation rec { libICE libXext libSM cyrus_sasl libgnt ncurses # optional: build finch - the console UI ] - ++ (lib.optional (openssl != null) openssl) - ++ (lib.optional (gnutls != null) gnutls) - ++ (lib.optional (libgcrypt != null) libgcrypt) - ++ (lib.optionals (stdenv.isLinux) [gtk2 gtkspell2 farstream]) - ++ (lib.optional (stdenv.isDarwin) gtk2-x11); + ++ lib.optional withOpenssl openssl + ++ lib.optionals withGnutls [ gnutls libgcrypt ] + ++ lib.optionals stdenv.isLinux [ gtk2 gtkspell2 farstream ] + ++ lib.optional stdenv.isDarwin gtk2-x11; propagatedBuildInputs = [ pkg-config gettext ] ++ (with perlPackages; [ perl XMLParser ]) - ++ (lib.optional (stdenv.isLinux) gtk2) - ++ (lib.optional (stdenv.isDarwin) gtk2-x11); + ++ lib.optional stdenv.isLinux gtk2 + ++ lib.optional stdenv.isDarwin gtk2-x11; patches = [ ./pidgin-makefile.patch ./add-search-path.patch ]; @@ -66,9 +56,9 @@ let unwrapped = stdenv.mkDerivation rec { "--disable-tcl" "--disable-gevolution" ] - ++ (lib.optionals (cyrus_sasl != null) [ "--enable-cyrus-sasl=yes" ]) - ++ (lib.optionals (gnutls != null) ["--enable-gnutls=yes" "--enable-nss=no"]) - ++ (lib.optionals (stdenv.isDarwin) ["--disable-gtkspell" "--disable-vv"]); + ++ lib.optionals withCyrus_sasl [ "--enable-cyrus-sasl=yes" ] + ++ lib.optionals withGnutls ["--enable-gnutls=yes" "--enable-nss=no"] + ++ lib.optionals stdenv.isDarwin ["--disable-gtkspell" "--disable-vv"]; enableParallelBuilding = true; @@ -90,12 +80,12 @@ let unwrapped = stdenv.mkDerivation rec { ''; passthru = { - makePluginPath = lib.makeSearchPathOutput "lib" "lib/purple-${majorVersion}"; + makePluginPath = lib.makeSearchPathOutput "lib" "lib/purple-${lib.versions.major version}"; }; meta = with lib; { description = "Multi-protocol instant messaging client"; - homepage = "http://pidgin.im"; + homepage = "https://pidgin.im/"; license = licenses.gpl2Plus; platforms = platforms.unix; maintainers = [ maintainers.vcunat ]; @@ -103,7 +93,7 @@ let unwrapped = stdenv.mkDerivation rec { }; in if plugins == [] then unwrapped - else import ./wrapper.nix { - inherit makeWrapper symlinkJoin plugins; + else callPackage ./wrapper.nix { + inherit plugins; pidgin = unwrapped; } diff --git a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix index 095f838fe981e..d5641c24fb07a 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix @@ -1,4 +1,4 @@ -{ symlinkJoin, pidgin, makeWrapper, plugins }: +{ lib, symlinkJoin, pidgin, makeWrapper, plugins }: let extraArgs = map (x: x.wrapArgs or "") plugins; @@ -11,10 +11,10 @@ in symlinkJoin { postBuild = '' wrapProgram $out/bin/pidgin \ - --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.majorVersion} $out/lib/pidgin" \ + --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${lib.versions.major pidgin.version} $out/lib/pidgin" \ ${toString extraArgs} wrapProgram $out/bin/finch \ - --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.majorVersion}" \ + --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${lib.versions.major pidgin.version}" \ ${toString extraArgs} ''; } |