1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchurl,
6 autoreconfHook,
7 bison,
8 flex,
9 openssl,
10 gnutls,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "charybdis";
15 version = "4.1.2";
16
17 src = fetchFromGitHub {
18 owner = "charybdis-ircd";
19 repo = "charybdis";
20 rev = "${pname}-${version}";
21 sha256 = "1lndk0yp27qm8bds4jd204ynxcq92fqmpfb0kkcla5zgky3miks3";
22 };
23
24 patches = [
25 (fetchurl {
26 url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/d13eb723d7e9512fb2f2516e5934bd927a92eb2c/community/charybdis/fix-missing-include.patch";
27 hash = "sha256-8JXYuIjoHQg+l33OjseF5nnd5ZPagBA2/bSa3Il5Te4=";
28 })
29 ];
30
31 postPatch = ''
32 substituteInPlace include/defaults.h --replace 'PKGLOCALSTATEDIR "' '"/var/lib/charybdis'
33 substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/charybdis'
34 '';
35
36 autoreconfPhase = "sh autogen.sh";
37
38 configureFlags = [
39 "--enable-epoll"
40 "--enable-ipv6"
41 "--enable-openssl=${openssl.dev}"
42 "--with-program-prefix=charybdis-"
43 ];
44
45 nativeBuildInputs = [
46 autoreconfHook
47 bison
48 flex
49 ];
50 buildInputs = [
51 openssl
52 gnutls
53 ];
54
55 meta = with lib; {
56 description = "IRCv3 server designed to be highly scalable";
57 homepage = "https://github.com/charybdis-ircd/charybdis";
58 license = licenses.gpl2Plus;
59 maintainers = with maintainers; [ lassulus ];
60 platforms = platforms.unix;
61 };
62
63}