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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
{ lib
, stdenv
, fetchurl
, cmake
, pkg-config
, icu
, openssl
, withArgon2 ? true, libargon2
, withI18N ? true, boost, gettext
, withPerl ? false, perl
, withPython ? false, python3
, withTcl ? false, tcl
, withCyrus ? true, cyrus_sasl
, withZlib ? true, zlib
, withIPv6 ? true
}:
let
inherit (lib)
cmakeBool
;
in
stdenv.mkDerivation rec {
pname = "znc";
version = "1.9.0";
src = fetchurl {
url = "https://znc.in/releases/archive/${pname}-${version}.tar.gz";
hash = "sha256-i5nJ27IcEwlwUHNGC+m/rLb3sOg6Ff5dS3FAIBs50qE=";
};
postPatch = ''
substituteInPlace znc.pc.cmake.in \
--replace-fail '$'{exec_prefix}/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@ \
--replace-fail '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace-fail '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
icu
openssl
] ++ lib.optional withArgon2 libargon2
++ lib.optionals withI18N [ boost gettext ]
++ lib.optional withPerl perl
++ lib.optional withPython python3
++ lib.optional withTcl tcl
++ lib.optional withCyrus cyrus_sasl
++ lib.optional withZlib zlib;
cmakeFlags = [
(cmakeBool "WANT_ARGON" withArgon2)
(cmakeBool "WANT_I18N" withI18N)
(cmakeBool "WANT_PERL" withPerl)
(cmakeBool "WANT_PYTHON" withPython)
(cmakeBool "WANT_TCL" withTcl)
(cmakeBool "WANT_CYRUS" withCyrus)
(cmakeBool "WANT_ZLIB" withZlib)
(cmakeBool "WANT_IPV6" withIPv6)
];
enableParallelBuilding = true;
meta = with lib; {
changelog = "https://github.com/znc/znc/blob/znc-${version}/ChangeLog.md";
description = "Advanced IRC bouncer";
homepage = "https://wiki.znc.in/ZNC";
maintainers = with maintainers; [ schneefux lnl7 ];
license = licenses.asl20;
platforms = platforms.unix;
};
}
|