2018-03-13 08:17:30 -07:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
|
|
|
|
, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
|
2020-09-23 12:36:53 -07:00
|
|
|
, cmocka, libmicrohttpd, expat, sqlite, libmesode, fetchpatch
|
2019-02-22 12:55:14 -08:00
|
|
|
, autoconf-archive
|
2015-01-04 12:23:15 -08:00
|
|
|
|
2019-02-03 07:30:17 -08:00
|
|
|
, autoAwaySupport ? true, libXScrnSaver ? null, libX11 ? null
|
2019-05-22 04:03:39 -07:00
|
|
|
, notifySupport ? true, libnotify ? null, gdk-pixbuf ? null
|
2019-02-03 07:30:17 -08:00
|
|
|
, traySupport ? true, gnome2 ? null
|
2017-10-12 13:08:20 -07:00
|
|
|
, pgpSupport ? true, gpgme ? null
|
|
|
|
, pythonPluginSupport ? true, python ? null
|
2019-08-05 09:00:24 -07:00
|
|
|
, omemoSupport ? true, libsignal-protocol-c ? null, libgcrypt ? null
|
2015-01-04 23:22:32 -08:00
|
|
|
}:
|
|
|
|
|
2017-10-12 13:08:20 -07:00
|
|
|
assert autoAwaySupport -> libXScrnSaver != null && libX11 != null;
|
2019-05-22 04:03:39 -07:00
|
|
|
assert notifySupport -> libnotify != null && gdk-pixbuf != null;
|
2017-10-12 13:08:20 -07:00
|
|
|
assert traySupport -> gnome2 != null;
|
|
|
|
assert pgpSupport -> gpgme != null;
|
|
|
|
assert pythonPluginSupport -> python != null;
|
2019-08-05 09:00:24 -07:00
|
|
|
assert omemoSupport -> libsignal-protocol-c != null && libgcrypt != null;
|
2015-01-04 23:22:32 -08:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2015-01-04 15:46:10 -08:00
|
|
|
|
2015-01-04 12:23:15 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "profanity";
|
2020-08-10 02:51:30 -07:00
|
|
|
version = "0.9.5";
|
2015-01-04 12:23:15 -08:00
|
|
|
|
2018-03-13 08:17:30 -07:00
|
|
|
src = fetchFromGitHub {
|
2019-08-04 08:03:54 -07:00
|
|
|
owner = "profanity-im";
|
2018-03-13 08:17:30 -07:00
|
|
|
repo = "profanity";
|
2019-09-08 16:38:31 -07:00
|
|
|
rev = version;
|
2020-08-10 02:51:30 -07:00
|
|
|
sha256 = "14vbblf639f90bb4npg2xv53cpvk9am9ic4pmc1vnv4m3zsndjg5";
|
2015-01-04 12:23:15 -08:00
|
|
|
};
|
|
|
|
|
2020-08-10 02:51:30 -07:00
|
|
|
patches = [
|
2020-09-23 12:36:53 -07:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/profanity-im/profanity/commit/54667c022f17bdb547c3b8b4eec1c2889c9d60f3.patch";
|
|
|
|
sha256 = "0aqrq45im1qnq308hyhh7dqbggzmcqb0b868wr5v8v08pd94s45k";
|
|
|
|
})
|
2020-08-10 02:51:30 -07:00
|
|
|
./patches/packages-osx.patch
|
|
|
|
];
|
2018-03-13 08:17:30 -07:00
|
|
|
|
2017-10-12 12:26:33 -07:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-02-22 12:55:14 -08:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook autoconf-archive glibcLocales pkgconfig
|
|
|
|
];
|
2017-10-12 12:26:33 -07:00
|
|
|
|
2015-01-04 23:22:32 -08:00
|
|
|
buildInputs = [
|
2018-03-13 08:17:30 -07:00
|
|
|
expect readline libuuid glib openssl expat ncurses libotr
|
2020-08-10 02:51:30 -07:00
|
|
|
curl libmesode cmocka libmicrohttpd sqlite
|
2017-10-12 13:08:20 -07:00
|
|
|
] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ]
|
2019-05-22 04:03:39 -07:00
|
|
|
++ optionals notifySupport [ libnotify gdk-pixbuf ]
|
2017-10-12 13:08:20 -07:00
|
|
|
++ optionals traySupport [ gnome2.gtk ]
|
|
|
|
++ optionals pgpSupport [ gpgme ]
|
2019-08-05 09:00:24 -07:00
|
|
|
++ optionals pythonPluginSupport [ python ]
|
|
|
|
++ optionals omemoSupport [ libsignal-protocol-c libgcrypt ];
|
2015-01-04 12:23:15 -08:00
|
|
|
|
2017-10-12 13:11:15 -07: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" ]
|
2019-08-05 09:00:24 -07:00
|
|
|
++ optionals pythonPluginSupport [ "--enable-python-plugins" ]
|
|
|
|
++ optionals omemoSupport [ "--enable-omemo" ];
|
2017-10-12 13:11:15 -07:00
|
|
|
|
2018-03-13 08:17:30 -07:00
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir m4
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
2015-01-04 12:23:15 -08: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.
|
|
|
|
'';
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.profanity.im/";
|
2015-01-04 23:22:32 -08:00
|
|
|
license = licenses.gpl3Plus;
|
2017-08-31 12:10:00 -07:00
|
|
|
platforms = platforms.unix;
|
2015-01-04 23:22:32 -08:00
|
|
|
maintainers = [ maintainers.devhell ];
|
2017-03-01 05:59:45 -08:00
|
|
|
updateWalker = true;
|
2015-01-04 12:23:15 -08:00
|
|
|
};
|
|
|
|
}
|