summary refs log tree commit diff
path: root/pkgs/servers/irc/charybdis/default.nix
blob: 3b2508a7760bf23d904072a8bf3a67cc9ce25595 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, stdenv, fetchFromGitHub, autoreconfHook, bison, flex, openssl, gnutls }:

stdenv.mkDerivation rec {
  name = "charybdis-4.1.2";

  src = fetchFromGitHub {
    owner = "charybdis-ircd";
    repo = "charybdis";
    rev = name;
    sha256 = "1lndk0yp27qm8bds4jd204ynxcq92fqmpfb0kkcla5zgky3miks3";
  };

  postPatch = ''
    substituteInPlace include/defaults.h --replace 'PKGLOCALSTATEDIR "' '"/var/lib/charybdis'
    substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/charybdis'
  '';

  autoreconfPhase = "sh autogen.sh";

  configureFlags = [
    "--enable-epoll"
    "--enable-ipv6"
    "--enable-openssl=${openssl.dev}"
    "--with-program-prefix=charybdis-"
  ];

  nativeBuildInputs = [ autoreconfHook bison flex ];
  buildInputs = [ openssl gnutls ];

  meta = with lib; {
    description = "IRCv3 server designed to be highly scalable";
    homepage    = "https://github.com/charybdis-ircd/charybdis";
    license     = licenses.gpl2;
    maintainers = with maintainers; [ lassulus fpletz ];
    platforms   = platforms.unix;
  };

}