2018-03-13 15:17:30 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
|
|
|
|
, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
|
|
|
|
, cmocka, libmicrohttpd, stabber, expat, libmesode
|
2015-01-04 20:23:15 +00:00
|
|
|
|
2019-02-03 15:30:17 +00:00
|
|
|
, autoAwaySupport ? true, libXScrnSaver ? null, libX11 ? null
|
|
|
|
, notifySupport ? true, libnotify ? null, gdk_pixbuf ? null
|
|
|
|
, traySupport ? true, gnome2 ? null
|
2017-10-12 21:08:20 +01:00
|
|
|
, pgpSupport ? true, gpgme ? null
|
|
|
|
, pythonPluginSupport ? true, python ? null
|
2015-01-05 07:22:32 +00:00
|
|
|
}:
|
|
|
|
|
2017-10-12 21:08:20 +01:00
|
|
|
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;
|
2015-01-05 07:22:32 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2015-01-04 23:46:10 +00:00
|
|
|
|
2015-01-04 20:23:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "profanity-${version}";
|
2017-03-01 13:59:45 +00:00
|
|
|
version = "0.5.1";
|
2015-01-04 20:23:15 +00:00
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "boothj5";
|
|
|
|
repo = "profanity";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "1ppr02wivhlrqr62r901clnycna8zpn6kr7n5rw8y3zfw21ny17z";
|
2015-01-04 20:23:15 +00:00
|
|
|
};
|
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
patches = [ ./patches/packages-osx.patch ./patches/undefined-macros.patch ];
|
|
|
|
|
2017-10-12 20:26:33 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook glibcLocales pkgconfig ];
|
2017-10-12 20:26:33 +01:00
|
|
|
|
2015-01-05 07:22:32 +00:00
|
|
|
buildInputs = [
|
2018-03-13 15:17:30 +00:00
|
|
|
expect readline libuuid glib openssl expat ncurses libotr
|
|
|
|
curl libmesode cmocka libmicrohttpd stabber
|
2017-10-12 21:08:20 +01:00
|
|
|
] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ]
|
|
|
|
++ optionals notifySupport [ libnotify gdk_pixbuf ]
|
|
|
|
++ optionals traySupport [ gnome2.gtk ]
|
|
|
|
++ optionals pgpSupport [ gpgme ]
|
|
|
|
++ optionals pythonPluginSupport [ python ];
|
2015-01-04 20:23:15 +00:00
|
|
|
|
2017-10-12 21:11:15 +01:00
|
|
|
# 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" ];
|
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir m4
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ ]
|
|
|
|
++ optionals pythonPluginSupport [ "-I${python}/include/${python.libPrefix}" ];
|
|
|
|
|
|
|
|
LDFLAGS = [ ]
|
2019-01-03 09:05:50 +00:00
|
|
|
++ optionals pythonPluginSupport [ "-L${python}/lib" "-l${python.libPrefix}" ];
|
2018-03-13 15:17:30 +00:00
|
|
|
|
2015-01-04 20:23:15 +00:00
|
|
|
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://profanity.im/;
|
2015-01-05 07:22:32 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2017-08-31 20:10:00 +01:00
|
|
|
platforms = platforms.unix;
|
2015-01-05 07:22:32 +00:00
|
|
|
maintainers = [ maintainers.devhell ];
|
2017-03-01 13:59:45 +00:00
|
|
|
updateWalker = true;
|
2015-01-04 20:23:15 +00:00
|
|
|
};
|
|
|
|
}
|