From d3ebcec8c441485b7b8b637f5b5f69505be006a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 1 Nov 2021 15:23:49 +0100 Subject: [PATCH] pidgin: remove ? null from inputs, format, cleanups --- .../instant-messengers/pidgin/default.nix | 48 ++++++++----------- pkgs/top-level/all-packages.nix | 6 +-- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index a7ea5bee3089..dd9bcd878d9d 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 +{ 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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 83c5bf4aba6c..8ec2a2239eca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27308,10 +27308,8 @@ with pkgs; picoloop = callPackage ../applications/audio/picoloop { }; pidgin = callPackage ../applications/networking/instant-messengers/pidgin { - openssl = if config.pidgin.openssl or true then openssl else null; - gnutls = if config.pidgin.gnutls or false then gnutls else null; - libgcrypt = if config.pidgin.gnutls or false then libgcrypt else null; - startupnotification = libstartup_notification; + withOpenssl = config.pidgin.openssl or true; + withGnutls = config.pidgin.gnutls or false; plugins = []; };