2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-05 17:05:55 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-05 17:05:55 +00:00
|
|
|
, flex
|
2021-05-20 23:08:51 +00:00
|
|
|
, lksctp-tools
|
2021-01-05 17:05:55 +00:00
|
|
|
, openssl
|
2021-05-20 23:08:51 +00:00
|
|
|
, pkg-config
|
2021-01-05 17:05:55 +00:00
|
|
|
, sqlite
|
2021-05-20 23:08:51 +00:00
|
|
|
, util-linux
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "solanum";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "unstable-2022-07-12";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solanum-ircd";
|
|
|
|
repo = pname;
|
2022-08-21 13:32:41 +00:00
|
|
|
rev = "860187d02895fc953de3475da07a7a06b9380254";
|
|
|
|
hash = "sha256-g8hXmxTfcPDmQ/cu4AI/iJfrhPLaQJEAeMdDhNDsVXs=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./dont-create-logdir.patch
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/solanum'
|
|
|
|
'';
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-epoll"
|
|
|
|
"--enable-ipv6"
|
|
|
|
"--enable-openssl=${openssl.dev}"
|
|
|
|
"--with-program-prefix=solanum-"
|
2021-05-20 23:08:51 +00:00
|
|
|
"--localstatedir=/var/lib"
|
|
|
|
"--with-rundir=/run"
|
|
|
|
"--with-logdir=/var/log"
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optionals (stdenv.isLinux) [
|
2021-01-05 17:05:55 +00:00
|
|
|
"--enable-sctp=${lksctp-tools.out}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
pkg-config
|
2021-05-20 23:08:51 +00:00
|
|
|
util-linux
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
enableParallelBuilding = true;
|
2023-03-27 19:17:25 +00:00
|
|
|
# Missing install depends:
|
|
|
|
# ...-binutils-2.40/bin/ld: cannot find ./.libs/libircd.so: No such file or directory
|
|
|
|
# collect2: error: ld returned 1 exit status
|
|
|
|
# make[4]: *** [Makefile:634: solanum] Error 1
|
|
|
|
enableParallelInstalling = false;
|
2021-02-16 17:04:54 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-05 17:05:55 +00:00
|
|
|
description = "An IRCd for unified networks";
|
|
|
|
homepage = "https://github.com/solanum-ircd/solanum";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2021-01-05 17:05:55 +00:00
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|