diff options
Diffstat (limited to 'pkgs/applications/networking/znc/default.nix')
-rw-r--r-- | pkgs/applications/networking/znc/default.nix | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/pkgs/applications/networking/znc/default.nix b/pkgs/applications/networking/znc/default.nix index 6675338719937..5b5c01587ad1e 100644 --- a/pkgs/applications/networking/znc/default.nix +++ b/pkgs/applications/networking/znc/default.nix @@ -1,45 +1,73 @@ -{ lib, stdenv, fetchurl, openssl, pkg-config +{ 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 -, withUnicode ? true, icu , withZlib ? true, zlib , withIPv6 ? true -, withDebug ? false }: +let + inherit (lib) + cmakeBool + ; +in + stdenv.mkDerivation rec { pname = "znc"; - version = "1.8.2"; + version = "1.9.0"; src = fetchurl { url = "https://znc.in/releases/archive/${pname}-${version}.tar.gz"; - sha256 = "03fyi0j44zcanj1rsdx93hkdskwfvhbywjiwd17f9q1a7yp8l8zz"; + hash = "sha256-i5nJ27IcEwlwUHNGC+m/rLb3sOg6Ff5dS3FAIBs50qE="; }; - nativeBuildInputs = [ pkg-config ]; + 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 = [ openssl ] + 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 withUnicode icu ++ lib.optional withZlib zlib; - configureFlags = [ - (lib.enableFeature withPerl "perl") - (lib.enableFeature withPython "python") - (lib.enableFeature withTcl "tcl") - (lib.withFeatureAs withTcl "tcl" "${tcl}/lib") - (lib.enableFeature withCyrus "cyrus") - ] ++ lib.optionals (!withIPv6) [ "--disable-ipv6" ] - ++ lib.optionals withDebug [ "--enable-debug" ]; + 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 ]; |