2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2021-01-01 20:37:44 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
2021-05-19 07:52:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-01 20:37:44 +00:00
|
|
|
, flex
|
2021-05-19 07:52:52 +00:00
|
|
|
, lksctp-tools
|
2021-01-01 20:37:44 +00:00
|
|
|
, openssl
|
2021-05-19 07:52:52 +00:00
|
|
|
, pkg-config
|
2021-01-01 20:37:44 +00:00
|
|
|
, sqlite
|
2021-05-19 07:52:52 +00:00
|
|
|
, util-linux
|
2024-08-17 22:29:43 +00:00
|
|
|
, nixosTests
|
2021-01-01 20:37:44 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "solanum";
|
2022-08-16 18:12:18 +00:00
|
|
|
version = "unstable-2022-07-12";
|
2021-01-01 20:37:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solanum-ircd";
|
|
|
|
repo = pname;
|
2022-08-16 18:12:18 +00:00
|
|
|
rev = "860187d02895fc953de3475da07a7a06b9380254";
|
|
|
|
hash = "sha256-g8hXmxTfcPDmQ/cu4AI/iJfrhPLaQJEAeMdDhNDsVXs=";
|
2021-01-01 20:37:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./dont-create-logdir.patch
|
|
|
|
];
|
|
|
|
|
2021-05-31 00:27:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/solanum'
|
|
|
|
'';
|
|
|
|
|
2021-01-01 20:37:44 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-epoll"
|
|
|
|
"--enable-ipv6"
|
|
|
|
"--enable-openssl=${openssl.dev}"
|
|
|
|
"--with-program-prefix=solanum-"
|
2021-05-19 07:52:52 +00:00
|
|
|
"--localstatedir=/var/lib"
|
|
|
|
"--with-rundir=/run"
|
|
|
|
"--with-logdir=/var/log"
|
2021-01-15 07:07:56 +00:00
|
|
|
] ++ lib.optionals (stdenv.hostPlatform.isLinux) [
|
2021-01-01 20:37:44 +00:00
|
|
|
"--enable-sctp=${lksctp-tools.out}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
pkg-config
|
2021-05-19 07:52:52 +00:00
|
|
|
util-linux
|
2021-01-01 20:37:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
|
2021-01-03 15:52:49 +00:00
|
|
|
enableParallelBuilding = true;
|
2023-03-09 22:53:06 +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-01-03 15:52:49 +00:00
|
|
|
|
2024-08-17 22:29:43 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) solanum; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-01-01 20:37:44 +00:00
|
|
|
description = "IRCd for unified networks";
|
|
|
|
homepage = "https://github.com/solanum-ircd/solanum";
|
2021-06-02 00:41:53 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2021-01-01 20:37:44 +00:00
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|