diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/servers/irc | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/servers/irc')
-rw-r--r-- | pkgs/servers/irc/atheme/default.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/irc/charybdis/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/irc/inspircd/default.nix | 225 | ||||
-rw-r--r-- | pkgs/servers/irc/ircd-hybrid/default.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/irc/ngircd/default.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/irc/robustirc-bridge/default.nix | 28 | ||||
-rw-r--r-- | pkgs/servers/irc/solanum/default.nix | 68 | ||||
-rw-r--r-- | pkgs/servers/irc/solanum/dont-create-logdir.patch | 14 |
8 files changed, 353 insertions, 17 deletions
diff --git a/pkgs/servers/irc/atheme/default.nix b/pkgs/servers/irc/atheme/default.nix index 06119861b9f..eb6f9345b2d 100644 --- a/pkgs/servers/irc/atheme/default.nix +++ b/pkgs/servers/irc/atheme/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchgit, libmowgli, pkgconfig, git, gettext, pcre, libidn, cracklib, openssl }: +{ lib, stdenv, fetchgit, libmowgli, pkg-config, git, gettext, pcre, libidn, cracklib, openssl }: stdenv.mkDerivation rec { pname = "atheme"; - version = "7.2.10-r2"; + version = "7.2.11"; src = fetchgit { url = "https://github.com/atheme/atheme.git"; rev = "v${version}"; - sha256 = "1yasfvbmixj4zzfv449hlcp0ms5c250lrshdy6x6l643nbnix4y9"; + sha256 = "15fs48cgzxblh2g4abl5v647ndfx9hg8cih2x67v3y7s9wz68wk2"; leaveDotGit = true; }; - nativeBuildInputs = [ pkgconfig git gettext ]; + nativeBuildInputs = [ pkg-config git gettext ]; buildInputs = [ libmowgli pcre libidn cracklib openssl ]; configureFlags = [ @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "--enable-reproducible-builds" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A set of services for IRC networks"; homepage = "https://atheme.github.io/"; license = licenses.isc; diff --git a/pkgs/servers/irc/charybdis/default.nix b/pkgs/servers/irc/charybdis/default.nix index ebc0b47f8b7..3b2508a7760 100644 --- a/pkgs/servers/irc/charybdis/default.nix +++ b/pkgs/servers/irc/charybdis/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, bison, flex, openssl, gnutls }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, bison, flex, openssl, gnutls }: stdenv.mkDerivation rec { name = "charybdis-4.1.2"; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace include/defaults.h --replace 'PKGLOCALSTATEDIR "' '"/var/lib/charybdis' + substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/charybdis' ''; autoreconfPhase = "sh autogen.sh"; @@ -26,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook bison flex ]; buildInputs = [ openssl gnutls ]; - meta = with stdenv.lib; { + meta = with lib; { description = "IRCv3 server designed to be highly scalable"; homepage = "https://github.com/charybdis-ircd/charybdis"; license = licenses.gpl2; diff --git a/pkgs/servers/irc/inspircd/default.nix b/pkgs/servers/irc/inspircd/default.nix new file mode 100644 index 00000000000..59fb4d4e769 --- /dev/null +++ b/pkgs/servers/irc/inspircd/default.nix @@ -0,0 +1,225 @@ +let + # inspircd ships a few extra modules that users can load + # via configuration. Upstream thus recommends to ship as + # many of them as possible. There is however a problem: + # inspircd is licensed under the GPL version 2 only and + # some modules link libraries that are incompatible with + # the GPL 2. Therefore we can't provide them as binaries + # via our binary-caches, but users should still be able + # to override this package and build the incompatible + # modules themselves. + # + # This means for us we need to a) prevent hydra from + # building a module set with a GPL incompatibility + # and b) dynamically figure out the largest possible + # set of modules to use depending on stdenv, because + # the used libc needs to be compatible as well. + # + # For an overview of all modules and their licensing + # situation, see https://docs.inspircd.org/packaging/ + + # Predicate for checking license compatibility with + # GPLv2. Since this is _only_ used for libc compatibility + # checking, only whitelist licenses used by notable + # libcs in nixpkgs (musl and glibc). + compatible = lib: drv: + lib.any (lic: lic == (drv.meta.license or {})) [ + lib.licenses.mit # musl + lib.licenses.lgpl2Plus # glibc + ]; + + # compatible if libc is compatible + libcModules = [ + "regex_posix" + "sslrehashsignal" + ]; + + # compatible if libc++ is compatible + # TODO(sternenseemann): + # we could enable "regex_stdlib" automatically, but only if + # we are using libcxxStdenv which is compatible with GPLv2, + # since the gcc libstdc++ license is GPLv2-incompatible + libcxxModules = [ + "regex_stdlib" + ]; + + compatibleModules = lib: stdenv: [ + # GPLv2 compatible dependencies + "argon2" + "ldap" + "mysql" + "pgsql" + "regex_pcre" + "regex_re2" + "regex_tre" + "sqlite3" + "ssl_gnutls" + ] ++ lib.optionals (compatible lib stdenv.cc.libc) libcModules; + +in + +{ lib +, stdenv +, fetchFromGitHub +, nixosTests +, perl +, pkg-config +, libargon2 +, openldap +, postgresql +, libmysqlclient +, pcre +, tre +, re2 +, sqlite +, gnutls +, libmaxminddb +, openssl +, mbedtls +# For a full list of module names, see https://docs.inspircd.org/packaging/ +, extraModules ? compatibleModules lib stdenv +}: + +let + extras = { + # GPLv2 compatible + argon2 = [ + (libargon2 // { + meta = libargon2.meta // { + # use libargon2 as CC0 since ASL20 is GPLv2-incompatible + # updating this here is important that meta.license is accurate + # libargon2 is licensed under either ASL20 or CC0. + license = lib.licenses.cc0; + }; + }) + ]; + ldap = [ openldap ]; + mysql = [ libmysqlclient ]; + pgsql = [ postgresql ]; + regex_pcre = [ pcre ]; + regex_re2 = [ re2 ]; + regex_tre = [ tre ]; + sqlite3 = [ sqlite ]; + ssl_gnutls = [ gnutls ]; + # depends on stdenv.cc.libc + regex_posix = []; + sslrehashsignal = []; + # depends on used libc++ + regex_stdlib = []; + # GPLv2 incompatible + geo_maxmind = [ libmaxminddb ]; + ssl_mbedtls = [ mbedtls ]; + ssl_openssl = [ openssl ]; + }; + + # buildInputs necessary for the enabled extraModules + extraInputs = lib.concatMap + (m: extras."${m}" or (builtins.throw "Unknown extra module ${m}")) + extraModules; + + # if true, we can't provide a binary version of this + # package without violating the GPL 2 + gpl2Conflict = + let + allowed = compatibleModules lib stdenv; + in + !lib.all (lib.flip lib.elem allowed) extraModules; + + # return list of the license(s) of the given derivation + getLicenses = drv: + let + lics = drv.meta.license or []; + in + if lib.isAttrs lics || lib.isString lics + then [ lics ] + else lics; + + # Whether any member of list1 is also member of list2, i. e. set intersection. + anyMembers = list1: list2: + lib.any (m1: lib.elem m1 list2) list1; + +in + +stdenv.mkDerivation rec { + pname = "inspircd"; + version = "3.10.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1817gmxk4v7k5398d2fb6qkwadg0fd980gqmr80wdnppx450ikn7"; + }; + + outputs = [ "bin" "lib" "man" "doc" "out" ]; + + nativeBuildInputs = [ + perl + pkg-config + ]; + buildInputs = extraInputs; + + configurePhase = '' + runHook preConfigure + + patchShebangs configure make/*.pl + + # configure is executed twice, once to set the extras + # to use and once to do the Makefile setup + ./configure \ + --enable-extras \ + ${lib.escapeShellArg (lib.concatStringsSep " " extraModules)} + + # this manually sets the flags instead of using configureFlags, because otherwise stdenv passes flags like --bindir, which make configure fail + ./configure \ + --disable-auto-extras \ + --distribution-label nixpkgs${version} \ + --uid 0 \ + --gid 0 \ + --binary-dir ${placeholder "bin"}/bin \ + --config-dir /etc/inspircd \ + --data-dir ${placeholder "lib"}/lib/inspircd \ + --example-dir ${placeholder "doc"}/share/doc/inspircd \ + --log-dir /var/log/inspircd \ + --manual-dir ${placeholder "man"}/share/man/man1 \ + --module-dir ${placeholder "lib"}/lib/inspircd \ + --runtime-dir /var/run \ + --script-dir ${placeholder "bin"}/share/inspircd \ + + runHook postConfigure + ''; + + postInstall = '' + # for some reasons the executables are not executable + chmod +x $bin/bin/* + ''; + + enableParallelBuilding = true; + + passthru.tests = { + nixos-test = nixosTests.inspircd; + }; + + meta = { + description = "A modular C++ IRC server"; + license = [ lib.licenses.gpl2Only ] + ++ lib.concatMap getLicenses extraInputs + ++ lib.optionals (anyMembers extraModules libcModules) (getLicenses stdenv.cc.libc) + # FIXME(sternenseemann): get license of used lib(std)c++ somehow + ++ lib.optional (anyMembers extraModules libcxxModules) "Unknown" + # Hack: Definitely prevent a hydra from building this package on + # a GPL 2 incompatibility even if it is not in a top-level attribute, + # but pulled in indirectly somehow. + ++ lib.optional gpl2Conflict lib.licenses.unfree; + maintainers = [ lib.maintainers.sternenseemann ]; + # windows is theoretically possible, but requires extra work + # which I am not willing to do and can't test. + # https://github.com/inspircd/inspircd/blob/master/win/README.txt + platforms = lib.platforms.unix; + homepage = "https://www.inspircd.org/"; + } // lib.optionalAttrs gpl2Conflict { + # make sure we never distribute a GPLv2-violating module + # in binary form. They can be built locally of course. + hydraPlatforms = []; + }; +} diff --git a/pkgs/servers/irc/ircd-hybrid/default.nix b/pkgs/servers/irc/ircd-hybrid/default.nix index 8b65c7870f9..b29f75fb529 100644 --- a/pkgs/servers/irc/ircd-hybrid/default.nix +++ b/pkgs/servers/irc/ircd-hybrid/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, openssl, zlib }: +{ lib, stdenv, fetchurl, openssl, zlib }: stdenv.mkDerivation rec { - name = "ircd-hybrid-8.2.24"; + name = "ircd-hybrid-8.2.36"; src = fetchurl { url = "mirror://sourceforge/ircd-hybrid/${name}.tgz"; - sha256 = "03nmzrhqfsxwry316nm80m9p285v65fz75ns7fg623hcy65jv97a"; + sha256 = "0sg4g0znl8ic8vklpy96z88gjksc165kl945a6fr1j4xc1bf8gcv"; }; buildInputs = [ openssl zlib ]; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { meta = { description = "An IPv6-capable IRC server"; - platforms = stdenv.lib.platforms.unix; - homepage = "http://www.ircd-hybrid.org/"; + platforms = lib.platforms.unix; + homepage = "https://www.ircd-hybrid.org/"; }; } diff --git a/pkgs/servers/irc/ngircd/default.nix b/pkgs/servers/irc/ngircd/default.nix index ff754a5390c..870a7836fe4 100644 --- a/pkgs/servers/irc/ngircd/default.nix +++ b/pkgs/servers/irc/ngircd/default.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchurl, zlib, openssl, pam, libiconv }: +{ lib, stdenv, fetchurl, zlib, openssl, pam, libiconv }: stdenv.mkDerivation rec { pname = "ngircd"; - version = "26"; + version = "26.1"; src = fetchurl { url = "https://ngircd.barton.de/pub/ngircd/${pname}-${version}.tar.xz"; - sha256 = "1ijmv18fa648y7apxb9vp4j9iq6fxq850kz5v36rysaq614cdp2n"; + sha256 = "sha256-VcFv0mAJ9vxqAH3076yHoC4SL2gGEs2hzibhehjYYlQ="; }; configureFlags = [ @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { meta = { description = "Next Generation IRC Daemon"; homepage = "https://ngircd.barton.de"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.gpl2; + platforms = lib.platforms.all; }; } diff --git a/pkgs/servers/irc/robustirc-bridge/default.nix b/pkgs/servers/irc/robustirc-bridge/default.nix new file mode 100644 index 00000000000..bc42fd12629 --- /dev/null +++ b/pkgs/servers/irc/robustirc-bridge/default.nix @@ -0,0 +1,28 @@ +{ lib, buildGoModule, fetchFromGitHub, nixosTests }: + +buildGoModule rec { + pname = "robustirc-bridge"; + version = "1.8"; + + src = fetchFromGitHub { + owner = "robustirc"; + repo = "bridge"; + rev = "v${version}"; + sha256 = "12jzil97147f978shdgm6whz7699db0shh0c1fzgrjh512dw502c"; + }; + + vendorSha256 = "0lm8j2iz0yysgi0bbh78ca629kb6sxvyy9al3aj2587hpvy79q85"; + + postInstall = '' + install -D robustirc-bridge.1 $out/share/man/man1/robustirc-bridge.1 + ''; + + passthru.tests.robustirc-bridge = nixosTests.robustirc-bridge; + + meta = with lib; { + description = "Bridge to robustirc.net-IRC-Network"; + homepage = "https://robustirc.net/"; + license = licenses.bsd3; + maintainers = [ maintainers.hax404 ]; + }; +} diff --git a/pkgs/servers/irc/solanum/default.nix b/pkgs/servers/irc/solanum/default.nix new file mode 100644 index 00000000000..d5e70799cf5 --- /dev/null +++ b/pkgs/servers/irc/solanum/default.nix @@ -0,0 +1,68 @@ +{ lib, stdenv +, autoreconfHook +, bison +, fetchFromGitHub +, flex +, lksctp-tools +, openssl +, pkg-config +, sqlite +, util-linux +}: + +stdenv.mkDerivation rec { + pname = "solanum"; + version = "unstable-2021-04-27"; + + src = fetchFromGitHub { + owner = "solanum-ircd"; + repo = pname; + rev = "3ff5a12e75662e9a642f2a4364797bd361eb0925"; + sha256 = "14ywmfdv8cncbyg08y2qdis00kwg8lvhkcgj185is67smh0qf88f"; + }; + + patches = [ + ./dont-create-logdir.patch + ]; + + postPatch = '' + substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/solanum' + ''; + + configureFlags = [ + "--enable-epoll" + "--enable-ipv6" + "--enable-openssl=${openssl.dev}" + "--with-program-prefix=solanum-" + "--localstatedir=/var/lib" + "--with-rundir=/run" + "--with-logdir=/var/log" + ] ++ lib.optionals (stdenv.isLinux) [ + "--enable-sctp=${lksctp-tools.out}/lib" + ]; + + nativeBuildInputs = [ + autoreconfHook + bison + flex + pkg-config + util-linux + ]; + + buildInputs = [ + openssl + sqlite + ]; + + doCheck = !stdenv.isDarwin; + + enableParallelBuilding = true; + + meta = with lib; { + description = "An IRCd for unified networks"; + homepage = "https://github.com/solanum-ircd/solanum"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ hexa ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/irc/solanum/dont-create-logdir.patch b/pkgs/servers/irc/solanum/dont-create-logdir.patch new file mode 100644 index 00000000000..e348dd7b85b --- /dev/null +++ b/pkgs/servers/irc/solanum/dont-create-logdir.patch @@ -0,0 +1,14 @@ +diff --git a/Makefile.am b/Makefile.am +index 19e7b396..21093521 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -35,9 +35,6 @@ include/serno.h: + echo '#define DATECODE 0UL' >>include/serno.h; \ + fi + +-install-data-hook: +- test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir} +- + install-exec-hook: + rm -f ${DESTDIR}${libdir}/*.la + rm -f ${DESTDIR}${moduledir}/*.la |