@@ -0,0 +1,60 @@
1+{ stdenv
2+, fetchFromGitHub
3+, autoreconfHook
4+, pkg-config
5+, bison
6+, flex
7+, openssl
8+, sqlite
9+, lksctp-tools
10+}:
11+
12+stdenv.mkDerivation rec {
13+ pname = "solanum";
14+ version = "unstable-2020-12-14";
15+
16+ src = fetchFromGitHub {
17+ owner = "solanum-ircd";
18+ repo = pname;
19+ rev = "551e5a146eab4948ce4a57d87a7f671f2d7cc02d";
20+ sha256 = "14cd2cb04w6nwck7q49jw5zvifkzhkmblwhjfskc2nxcdb5x3l96";
21+ };
22+
23+ patches = [
24+ ./dont-create-logdir.patch
25+ ];
26+
27+ configureFlags = [
28+ "--enable-epoll"
29+ "--enable-ipv6"
30+ "--enable-openssl=${openssl.dev}"
31+ "--with-program-prefix=solanum-"
32+ "--localstatedir=/var/lib/solanum"
33+ "--with-rundir=/run/solanum"
34+ "--with-logdir=/var/log/solanum"
35+ ] ++ stdenv.lib.optionals (stdenv.isLinux) [
36+ "--enable-sctp=${lksctp-tools.out}/lib"
37+ ];
38+
39+ nativeBuildInputs = [
40+ autoreconfHook
41+ bison
42+ flex
43+ pkg-config
44+ ];
45+
46+ buildInputs = [
47+ openssl
48+ sqlite
49+ ];
50+
51+ doCheck = !stdenv.isDarwin;
52+
53+ meta = with stdenv.lib; {
54+ description = "An IRCd for unified networks";
55+ homepage = "https://github.com/solanum-ircd/solanum";
56+ license = licenses.gpl2Only;
57+ maintainers = with maintainers; [ hexa ];
58+ platforms = platforms.unix;
59+ };
60+}