Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoconf-archive, 6 autoreconfHook, 7 cmocka, 8 curl, 9 expat, 10 expect, 11 glib, 12 glibcLocales, 13 libstrophe, 14 libmicrohttpd, 15 libotr, 16 libuuid, 17 ncurses, 18 openssl, 19 pkg-config, 20 readline, 21 sqlite, 22 autoAwaySupport ? true, 23 libXScrnSaver, 24 libX11, 25 notifySupport ? true, 26 libnotify, 27 gdk-pixbuf, 28 omemoSupport ? true, 29 libsignal-protocol-c, 30 libgcrypt, 31 qrencode, 32 pgpSupport ? true, 33 gpgme, 34 pythonPluginSupport ? true, 35 python3, 36 traySupport ? true, 37 gtk3, 38}: 39 40stdenv.mkDerivation (finalAttrs: { 41 pname = "profanity"; 42 version = "0.15.0"; 43 44 src = fetchFromGitHub { 45 owner = "profanity-im"; 46 repo = "profanity"; 47 rev = finalAttrs.version; 48 hash = "sha256-3TmnbTnL8SPSd3seThavOOJVELi8kWLSlZlAub24KZ4="; 49 }; 50 51 patches = [ 52 ./patches/packages-osx.patch 53 ]; 54 55 enableParallelBuilding = true; 56 57 nativeBuildInputs = [ 58 autoconf-archive 59 autoreconfHook 60 glibcLocales 61 pkg-config 62 ]; 63 64 buildInputs = [ 65 cmocka 66 curl 67 expat 68 expect 69 glib 70 libstrophe 71 libmicrohttpd 72 libotr 73 libuuid 74 ncurses 75 openssl 76 readline 77 sqlite 78 ] 79 ++ lib.optionals autoAwaySupport [ 80 libXScrnSaver 81 libX11 82 ] 83 ++ lib.optionals notifySupport [ 84 libnotify 85 gdk-pixbuf 86 ] 87 ++ lib.optionals omemoSupport [ 88 libsignal-protocol-c 89 libgcrypt 90 qrencode 91 ] 92 ++ lib.optionals pgpSupport [ gpgme ] 93 ++ lib.optionals pythonPluginSupport [ python3 ] 94 ++ lib.optionals traySupport [ gtk3 ]; 95 96 # Enable feature flags, so that build fail if libs are missing 97 configureFlags = [ 98 "--enable-c-plugins" 99 "--enable-otr" 100 ] 101 ++ lib.optionals notifySupport [ "--enable-notifications" ] 102 ++ lib.optionals traySupport [ "--enable-icons-and-clipboard" ] 103 ++ lib.optionals pgpSupport [ "--enable-pgp" ] 104 ++ lib.optionals pythonPluginSupport [ "--enable-python-plugins" ] 105 ++ lib.optionals omemoSupport [ "--enable-omemo" ]; 106 107 doCheck = true; 108 109 LC_ALL = "en_US.utf8"; 110 111 meta = with lib; { 112 homepage = "http://www.profanity.im/"; 113 description = "Console based XMPP client"; 114 mainProgram = "profanity"; 115 longDescription = '' 116 Profanity is a console based XMPP client written in C using ncurses and 117 libstrophe, inspired by Irssi. 118 ''; 119 license = licenses.gpl3Plus; 120 maintainers = [ maintainers.devhell ]; 121 platforms = platforms.unix; 122 }; 123})