From 7997c258db3f904c368890b0a40119cf7699a990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 1 Nov 2020 11:42:34 +0100 Subject: [PATCH] pidgin: bring back text-mode UI It disappeared in the parent commit. --- .../instant-messengers/pidgin/default.nix | 8 ++-- pkgs/development/libraries/libgnt/default.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/libgnt/default.nix diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index 4a0ef5ad771..b5bdef03db7 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -2,8 +2,9 @@ , gtkspell2, aspell , gst_all_1, startupnotification, gettext , perlPackages, libxml2, nss, nspr, farstream -, libXScrnSaver, ncurses, avahi, dbus, dbus-glib, intltool, libidn +, libXScrnSaver, avahi, dbus, dbus-glib, intltool, libidn , lib, python3, libICE, libXext, libSM +, libgnt, ncurses , cyrus_sasl ? null , openssl ? null , gnutls ? null @@ -23,8 +24,6 @@ let unwrapped = stdenv.mkDerivation rec { sha256 = "bb45f7c032f9efd6922a5dbf2840995775e5584771b23992d04f6eff7dff5336"; }; - inherit nss ncurses; - nativeBuildInputs = [ makeWrapper ]; NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"; @@ -35,9 +34,10 @@ let unwrapped = stdenv.mkDerivation rec { aspell startupnotification gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good libxml2 nss nspr - libXScrnSaver ncurses python-with-dbus + libXScrnSaver python-with-dbus avahi dbus dbus-glib intltool libidn libICE libXext libSM cyrus_sasl + libgnt ncurses # optional: build finch - the console UI ] ++ (lib.optional (openssl != null) openssl) ++ (lib.optional (gnutls != null) gnutls) diff --git a/pkgs/development/libraries/libgnt/default.nix b/pkgs/development/libraries/libgnt/default.nix new file mode 100644 index 00000000000..33ce7fbaa11 --- /dev/null +++ b/pkgs/development/libraries/libgnt/default.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, fetchurl, meson, ninja, pkg-config +, gtk-doc, docbook-xsl-nons +, glib, ncurses, libxml2 +, buildDocs ? true +}: +stdenv.mkDerivation rec { + pname = "libgnt"; + version = "2.14.1"; + + outputs = [ "out" "dev" ] ++ lib.optional buildDocs "devdoc"; + + src = fetchurl { + url = "mirror://sourceforge/pidgin/${pname}-${version}.tar.xz"; + sha256 = "1n2bxg0ignn53c08cp69pj4sdg53kwlqn23rincyjmpr327fdhsy"; + }; + + nativeBuildInputs = [ meson ninja pkg-config ] + ++ lib.optionals buildDocs [ gtk-doc docbook-xsl-nons ]; + + buildInputs = [ glib ncurses libxml2 ]; + + postPatch = '' + substituteInPlace meson.build --replace \ + "ncurses_sys_prefix = '/usr'" \ + "ncurses_sys_prefix = '${lib.getDev ncurses}'" + '' + lib.optionalString (!buildDocs) '' + sed "/^subdir('doc')$/d" -i meson.build + ''; + + meta = with lib; { + description = "An ncurses toolkit for creating text-mode graphical user interfaces"; + homepage = "https://keep.imfreedom.org/libgnt/libgnt/"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = with lib.maintainers; [ ony ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3ca6d840318..855d6e57fc7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16474,6 +16474,8 @@ in libgksu = callPackage ../development/libraries/libgksu { }; + libgnt = callPackage ../development/libraries/libgnt { }; + libgpgerror = callPackage ../development/libraries/libgpg-error { }; # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=README;h=fd6e1a83f55696c1f7a08f6dfca08b2d6b7617ec;hb=70058cd9f944d620764e57c838209afae8a58c78#l118