2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, openssl
|
2018-03-13 15:17:30 +00:00
|
|
|
, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
|
2021-01-14 15:05:42 +00:00
|
|
|
, cmocka, libmicrohttpd, expat, sqlite, libmesode, autoconf-archive
|
2015-01-04 20:23:15 +00:00
|
|
|
|
2019-02-03 15:30:17 +00:00
|
|
|
, autoAwaySupport ? true, libXScrnSaver ? null, libX11 ? null
|
2019-05-22 12:03:39 +01:00
|
|
|
, notifySupport ? true, libnotify ? null, gdk-pixbuf ? null
|
2021-03-16 17:22:15 +00:00
|
|
|
, traySupport ? true, gtk2 ? null
|
2017-10-12 21:08:20 +01:00
|
|
|
, pgpSupport ? true, gpgme ? null
|
|
|
|
, pythonPluginSupport ? true, python ? null
|
2019-08-05 17:00:24 +01:00
|
|
|
, omemoSupport ? true, libsignal-protocol-c ? null, libgcrypt ? null
|
2015-01-05 07:22:32 +00:00
|
|
|
}:
|
|
|
|
|
2017-10-12 21:08:20 +01:00
|
|
|
assert autoAwaySupport -> libXScrnSaver != null && libX11 != null;
|
2019-05-22 12:03:39 +01:00
|
|
|
assert notifySupport -> libnotify != null && gdk-pixbuf != null;
|
2021-03-16 17:22:15 +00:00
|
|
|
assert traySupport -> gtk2 != null;
|
2017-10-12 21:08:20 +01:00
|
|
|
assert pgpSupport -> gpgme != null;
|
|
|
|
assert pythonPluginSupport -> python != null;
|
2019-08-05 17:00:24 +01:00
|
|
|
assert omemoSupport -> libsignal-protocol-c != null && libgcrypt != null;
|
2015-01-05 07:22:32 +00:00
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2015-01-04 23:46:10 +00:00
|
|
|
|
2015-01-04 20:23:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "profanity";
|
2021-07-18 16:17:03 +01:00
|
|
|
version = "0.11.0";
|
2015-01-04 20:23:15 +00:00
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
src = fetchFromGitHub {
|
2019-08-04 16:03:54 +01:00
|
|
|
owner = "profanity-im";
|
2018-03-13 15:17:30 +00:00
|
|
|
repo = "profanity";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2021-07-18 16:17:03 +01:00
|
|
|
sha256 = "0xmzsh0szm8x3hgw65j0cd2bp8cmrnq5pjz49lqajircyzflsngm";
|
2015-01-04 20:23:15 +00:00
|
|
|
};
|
|
|
|
|
2020-08-10 10:51:30 +01:00
|
|
|
patches = [
|
|
|
|
./patches/packages-osx.patch
|
|
|
|
];
|
2018-03-13 15:17:30 +00:00
|
|
|
|
2017-10-12 20:26:33 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-02-22 20:55:14 +00:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 02:09:27 +00:00
|
|
|
autoreconfHook autoconf-archive glibcLocales pkg-config
|
2019-02-22 20:55:14 +00:00
|
|
|
];
|
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
|
2020-08-10 10:51:30 +01:00
|
|
|
curl libmesode cmocka libmicrohttpd sqlite
|
2017-10-12 21:08:20 +01:00
|
|
|
] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ]
|
2019-05-22 12:03:39 +01:00
|
|
|
++ optionals notifySupport [ libnotify gdk-pixbuf ]
|
2021-03-16 17:22:15 +00:00
|
|
|
++ optionals traySupport [ gtk2 ]
|
2017-10-12 21:08:20 +01:00
|
|
|
++ optionals pgpSupport [ gpgme ]
|
2019-08-05 17:00:24 +01:00
|
|
|
++ optionals pythonPluginSupport [ python ]
|
|
|
|
++ optionals omemoSupport [ libsignal-protocol-c libgcrypt ];
|
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" ]
|
2021-04-16 20:16:02 +01:00
|
|
|
++ optionals traySupport [ "--enable-icons-and-clipboard" ]
|
2017-10-12 21:11:15 +01:00
|
|
|
++ optionals pgpSupport [ "--enable-pgp" ]
|
2019-08-05 17:00:24 +01:00
|
|
|
++ optionals pythonPluginSupport [ "--enable-python-plugins" ]
|
|
|
|
++ optionals omemoSupport [ "--enable-omemo" ];
|
2017-10-12 21:11:15 +01:00
|
|
|
|
2018-03-13 15:17:30 +00:00
|
|
|
preAutoreconf = ''
|
|
|
|
mkdir m4
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
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.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.profanity.im/";
|
2015-01-05 07:22:32 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2017-08-31 20:10:00 +01:00
|
|
|
platforms = platforms.unix;
|
2021-01-14 15:05:42 +00:00
|
|
|
changelog = "https://github.com/profanity-im/profanity/releases/tag/${version}";
|
|
|
|
downloadPage = "https://github.com/profanity-im/profanity/releases/";
|
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
|
|
|
};
|
|
|
|
}
|