Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchurl, 4 fetchpatch, 5 stdenv, 6 gnutls, 7 glib, 8 pkg-config, 9 check, 10 libotr, 11 python3, 12 enableLibPurple ? false, 13 pidgin ? null, 14 enablePam ? false, 15 pam ? null, 16}: 17 18stdenv.mkDerivation rec { 19 pname = "bitlbee"; 20 version = "3.6"; 21 22 src = fetchurl { 23 url = "mirror://bitlbee/src/bitlbee-${version}.tar.gz"; 24 sha256 = "0zhhcbcr59sx9h4maf8zamzv2waya7sbsl7w74gbyilvy93dw5cz"; 25 }; 26 27 nativeBuildInputs = [ pkg-config ] ++ lib.optional doCheck check; 28 29 buildInputs = [ 30 gnutls 31 libotr 32 python3 33 ] 34 ++ lib.optional enableLibPurple pidgin 35 ++ lib.optional enablePam pam; 36 37 propagatedBuildInputs = [ glib ]; 38 39 configureFlags = [ 40 "--otr=1" 41 "--ssl=gnutls" 42 "--pidfile=/var/lib/bitlbee/bitlbee.pid" 43 ] 44 ++ lib.optional enableLibPurple "--purple=1" 45 ++ lib.optional enablePam "--pam=1"; 46 47 patches = [ 48 # This should be dropped once the issue is fixed upstream. 49 (fetchpatch { 50 url = "https://github.com/bitlbee/bitlbee/commit/6ff651b3ec93e5fd74f80766d5e9714d963137bc.diff"; 51 sha256 = "144dpm4kq7c268fpww1q3n88ayg068n73fbabr5arh1zryw48qfv"; 52 }) 53 ]; 54 55 installTargets = [ 56 "install" 57 "install-dev" 58 ]; 59 60 doCheck = !enableLibPurple; # Checks fail with libpurple for some reason 61 checkPhase = '' 62 # check flags set VERBOSE=y which breaks the build due overriding a command 63 make check 64 ''; 65 66 enableParallelBuilding = true; 67 68 meta = with lib; { 69 description = "IRC instant messaging gateway"; 70 mainProgram = "bitlbee"; 71 72 longDescription = '' 73 BitlBee brings IM (instant messaging) to IRC clients. It's a 74 great solution for people who have an IRC client running all the 75 time and don't want to run an additional MSN/AIM/whatever 76 client. 77 78 BitlBee currently supports the following IM networks/protocols: 79 XMPP/Jabber (including Google Talk), MSN Messenger, Yahoo! 80 Messenger, AIM and ICQ. 81 ''; 82 83 homepage = "https://www.bitlbee.org/"; 84 license = licenses.gpl2Plus; 85 86 maintainers = with maintainers; [ 87 lassulus 88 pSub 89 ]; 90 platforms = platforms.gnu ++ platforms.linux; # arbitrary choice 91 }; 92}