nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix

77 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
, cmocka, libmicrohttpd, stabber, expat, libmesode
2019-02-22 20:55:14 +00:00
, autoconf-archive
, autoAwaySupport ? true, libXScrnSaver ? null, libX11 ? null
, notifySupport ? true, libnotify ? null, gdk_pixbuf ? null
, traySupport ? true, gnome2 ? null
, pgpSupport ? true, gpgme ? null
, pythonPluginSupport ? true, python ? null
}:
assert autoAwaySupport -> libXScrnSaver != null && libX11 != null;
assert notifySupport -> libnotify != null && gdk_pixbuf != null;
assert traySupport -> gnome2 != null;
assert pgpSupport -> gpgme != null;
assert pythonPluginSupport -> python != null;
with stdenv.lib;
stdenv.mkDerivation rec {
name = "profanity-${version}";
version = "0.6.0";
src = fetchFromGitHub {
owner = "boothj5";
repo = "profanity";
rev = "${version}";
sha256 = "0f5kfzy22wzyj7rnd2nbj93q96ga87b53wlg8lfg83qdphx1ymz9";
};
patches = [ ./patches/packages-osx.patch ./patches/undefined-macros.patch ];
2017-10-12 20:26:33 +01:00
enableParallelBuilding = true;
2019-02-22 20:55:14 +00:00
nativeBuildInputs = [
autoreconfHook autoconf-archive glibcLocales pkgconfig
];
2017-10-12 20:26:33 +01:00
buildInputs = [
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 ]
++ optionals pgpSupport [ gpgme ]
++ optionals pythonPluginSupport [ python ];
# Enable feature flags, so that build fail if libs are missing
configureFlags = [ "--enable-c-plugins" "--enable-otr" ]
++ optionals notifySupport [ "--enable-notifications" ]
++ optionals traySupport [ "--enable-icons" ]
++ optionals pgpSupport [ "--enable-pgp" ]
++ optionals pythonPluginSupport [ "--enable-python-plugins" ];
preAutoreconf = ''
mkdir m4
'';
doCheck = true;
LC_ALL = "en_US.utf8";
meta = {
description = "A console based XMPP client";
longDescription = ''
Profanity is a console based XMPP client written in C using ncurses and
libstrophe, inspired by Irssi.
'';
homepage = http://www.profanity.im/;
license = licenses.gpl3Plus;
2017-08-31 20:10:00 +01:00
platforms = platforms.unix;
maintainers = [ maintainers.devhell ];
2017-03-01 13:59:45 +00:00
updateWalker = true;
};
}