summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/solanum/default.nix
blob: 1d39526ed1ee3bda9840ded1c092758e5ffc4083 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, bison
, flex
, openssl
, sqlite
, lksctp-tools
}:

stdenv.mkDerivation rec {
  pname = "solanum";
  version = "unstable-2020-12-14";

  src = fetchFromGitHub {
    owner = "solanum-ircd";
    repo = pname;
    rev = "551e5a146eab4948ce4a57d87a7f671f2d7cc02d";
    sha256 = "14cd2cb04w6nwck7q49jw5zvifkzhkmblwhjfskc2nxcdb5x3l96";
  };

  patches = [
    ./dont-create-logdir.patch
  ];

  configureFlags = [
    "--enable-epoll"
    "--enable-ipv6"
    "--enable-openssl=${openssl.dev}"
    "--with-program-prefix=solanum-"
    "--localstatedir=/var/lib/solanum"
    "--with-rundir=/run/solanum"
    "--with-logdir=/var/log/solanum"
  ] ++ lib.optionals (stdenv.isLinux) [
    "--enable-sctp=${lksctp-tools.out}/lib"
  ];

  nativeBuildInputs = [
    autoreconfHook
    bison
    flex
    pkg-config
  ];

  buildInputs = [
    openssl
    sqlite
  ];

  doCheck = !stdenv.isDarwin;

  enableParallelBuilding = true;

  meta = with lib; {
    description = "An IRCd for unified networks";
    homepage = "https://github.com/solanum-ircd/solanum";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ hexa ];
    platforms = platforms.unix;
  };
}