diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/irc')
-rw-r--r-- | nixpkgs/pkgs/servers/irc/atheme/default.nix | 33 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/charybdis/default.nix | 39 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/ergochat/default.nix | 27 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/inspircd/default.nix | 228 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/irccat/default.nix | 23 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/ircd-hybrid/default.nix | 27 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/ngircd/default.nix | 30 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/robustirc-bridge/default.nix | 29 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/solanum/default.nix | 73 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/irc/solanum/dont-create-logdir.patch | 14 |
10 files changed, 523 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/irc/atheme/default.nix b/nixpkgs/pkgs/servers/irc/atheme/default.nix new file mode 100644 index 000000000000..3df18bbe0c97 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/atheme/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchgit, libmowgli, pkg-config, git, gettext, pcre, libidn, libxcrypt, cracklib, openssl }: + +stdenv.mkDerivation rec { + pname = "atheme"; + version = "7.2.12"; + + src = fetchgit { + url = "https://github.com/atheme/atheme.git"; + rev = "v${version}"; + sha256 = "sha256-KAC1ZPNo4TqfVryKOYYef8cRWRgFmyEdvl1bgvpGNiM="; + leaveDotGit = true; + }; + + nativeBuildInputs = [ pkg-config git gettext ]; + buildInputs = [ libmowgli pcre libidn libxcrypt cracklib openssl ]; + + configureFlags = [ + "--with-pcre" + "--with-libidn" + "--with-cracklib" + "--enable-large-net" + "--enable-contrib" + "--enable-reproducible-builds" + ]; + + meta = with lib; { + description = "A set of services for IRC networks"; + homepage = "https://atheme.github.io/"; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ leo60228 ]; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/charybdis/default.nix b/nixpkgs/pkgs/servers/irc/charybdis/default.nix new file mode 100644 index 000000000000..37d5b299837d --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/charybdis/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, bison, flex, openssl, gnutls }: + +stdenv.mkDerivation rec { + pname = "charybdis"; + version = "4.1.2"; + + src = fetchFromGitHub { + owner = "charybdis-ircd"; + repo = "charybdis"; + rev = "${pname}-${version}"; + sha256 = "1lndk0yp27qm8bds4jd204ynxcq92fqmpfb0kkcla5zgky3miks3"; + }; + + postPatch = '' + substituteInPlace include/defaults.h --replace 'PKGLOCALSTATEDIR "' '"/var/lib/charybdis' + substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/charybdis' + ''; + + autoreconfPhase = "sh autogen.sh"; + + configureFlags = [ + "--enable-epoll" + "--enable-ipv6" + "--enable-openssl=${openssl.dev}" + "--with-program-prefix=charybdis-" + ]; + + nativeBuildInputs = [ autoreconfHook bison flex ]; + buildInputs = [ openssl gnutls ]; + + meta = with lib; { + description = "IRCv3 server designed to be highly scalable"; + homepage = "https://github.com/charybdis-ircd/charybdis"; + license = licenses.gpl2; + maintainers = with maintainers; [ lassulus ]; + platforms = platforms.unix; + }; + +} diff --git a/nixpkgs/pkgs/servers/irc/ergochat/default.nix b/nixpkgs/pkgs/servers/irc/ergochat/default.nix new file mode 100644 index 000000000000..ad8e3f44a809 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/ergochat/default.nix @@ -0,0 +1,27 @@ +{ buildGoModule, fetchFromGitHub, lib, nixosTests }: + +buildGoModule rec { + pname = "ergo"; + version = "2.13.0"; + + src = fetchFromGitHub { + owner = "ergochat"; + repo = "ergo"; + rev = "v${version}"; + sha256 = "sha256-EoYyLmz6MfLkLY0WbHfFvKwrcWApty6/+UCslm8P0Q0="; + }; + + vendorHash = null; + + passthru.tests.ergochat = nixosTests.ergochat; + + meta = { + changelog = "https://github.com/ergochat/ergo/blob/v${version}/CHANGELOG.md"; + description = "A modern IRC server (daemon/ircd) written in Go"; + mainProgram = "ergo"; + homepage = "https://github.com/ergochat/ergo"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ lassulus tv ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/inspircd/default.nix b/nixpkgs/pkgs/servers/irc/inspircd/default.nix new file mode 100644 index 000000000000..68dbbeacb07f --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/inspircd/default.nix @@ -0,0 +1,228 @@ +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_pcre2" + "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 +, pcre2 +, 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_pcre2 = [ pcre2 ]; + 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.17.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-isLZKYf32+va66FGYMq4mWIEHNpqUWCcVhYWLA5lRwk="; + }; + + 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/nixpkgs/pkgs/servers/irc/irccat/default.nix b/nixpkgs/pkgs/servers/irc/irccat/default.nix new file mode 100644 index 000000000000..ce0ba4785ca7 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/irccat/default.nix @@ -0,0 +1,23 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "irccat"; + version = "0.4.8"; + + src = fetchFromGitHub { + owner = "irccloud"; + repo = "irccat"; + rev = "v${version}"; + hash = "sha256-fr5x1usviJPbc4t5SpIVgV9Q6071XG8eYtyeyraddts="; + }; + + vendorHash = "sha256-IRXyM000ZDiLPHX20lXlx00tkCzBe5PqvdgXAvm0EAw="; + + meta = with lib; { + homepage = "https://github.com/irccloud/irccat"; + description = "Send events to IRC channels from scripts and other applications"; + mainProgram = "irccat"; + maintainers = with maintainers; [ qyliss ]; + license = licenses.gpl3Only; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/ircd-hybrid/default.nix b/nixpkgs/pkgs/servers/irc/ircd-hybrid/default.nix new file mode 100644 index 000000000000..cda989b8bef9 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/ircd-hybrid/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchurl, openssl, zlib, libxcrypt }: + +stdenv.mkDerivation rec { + pname = "ircd-hybrid"; + version = "8.2.43"; + + src = fetchurl { + url = "mirror://sourceforge/ircd-hybrid/ircd-hybrid-${version}.tgz"; + sha256 = "sha256-vQNzx4DjCMGm9piQFf8o4cIpme92S3toY2tihXPCUe8="; + }; + + buildInputs = [ openssl zlib libxcrypt ]; + + configureFlags = [ + "--with-nicklen=100" + "--with-topiclen=360" + "--enable-openssl=${openssl.dev}" + ]; + + postInstall = "echo postinstall; mkdir -p \${out}/ ; rm -rf \${out}/logs ; ln -s /home/ircd \${out}/logs;"; + + meta = { + description = "An IPv6-capable IRC server"; + platforms = lib.platforms.unix; + homepage = "https://www.ircd-hybrid.org/"; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/ngircd/default.nix b/nixpkgs/pkgs/servers/irc/ngircd/default.nix new file mode 100644 index 000000000000..3ec80a5075e0 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/ngircd/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchurl, zlib, openssl, pam, libiconv }: + +stdenv.mkDerivation rec { + pname = "ngircd"; + version = "26.1"; + + src = fetchurl { + url = "https://ngircd.barton.de/pub/ngircd/${pname}-${version}.tar.xz"; + sha256 = "sha256-VcFv0mAJ9vxqAH3076yHoC4SL2gGEs2hzibhehjYYlQ="; + }; + + configureFlags = [ + "--with-syslog" + "--with-zlib" + "--with-pam" + "--with-openssl" + "--enable-ipv6" + "--with-iconv" + ]; + + buildInputs = [ zlib pam openssl libiconv ]; + + meta = { + description = "Next Generation IRC Daemon"; + mainProgram = "ngircd"; + homepage = "https://ngircd.barton.de"; + license = lib.licenses.gpl2; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/robustirc-bridge/default.nix b/nixpkgs/pkgs/servers/irc/robustirc-bridge/default.nix new file mode 100644 index 000000000000..2d5c6ef1231b --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/robustirc-bridge/default.nix @@ -0,0 +1,29 @@ +{ lib, buildGoModule, fetchFromGitHub, nixosTests }: + +buildGoModule rec { + pname = "robustirc-bridge"; + version = "1.9.0"; + + src = fetchFromGitHub { + owner = "robustirc"; + repo = "bridge"; + rev = "v${version}"; + hash = "sha256-8SNy3xqVahBuEXCrG21zIggXeahbzJtqtFMxfp+r48g="; + }; + + vendorHash = "sha256-NBouR+AwQd7IszEcnYRxHFKtCdVTdfOWnzYjdZ5fXfs="; + + 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"; + mainProgram = "robustirc-bridge"; + homepage = "https://robustirc.net/"; + license = licenses.bsd3; + maintainers = [ maintainers.hax404 ]; + }; +} diff --git a/nixpkgs/pkgs/servers/irc/solanum/default.nix b/nixpkgs/pkgs/servers/irc/solanum/default.nix new file mode 100644 index 000000000000..14924e6656c9 --- /dev/null +++ b/nixpkgs/pkgs/servers/irc/solanum/default.nix @@ -0,0 +1,73 @@ +{ lib, stdenv +, autoreconfHook +, bison +, fetchFromGitHub +, flex +, lksctp-tools +, openssl +, pkg-config +, sqlite +, util-linux +}: + +stdenv.mkDerivation rec { + pname = "solanum"; + version = "unstable-2022-07-12"; + + src = fetchFromGitHub { + owner = "solanum-ircd"; + repo = pname; + rev = "860187d02895fc953de3475da07a7a06b9380254"; + hash = "sha256-g8hXmxTfcPDmQ/cu4AI/iJfrhPLaQJEAeMdDhNDsVXs="; + }; + + 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; + # 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; + + 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/nixpkgs/pkgs/servers/irc/solanum/dont-create-logdir.patch b/nixpkgs/pkgs/servers/irc/solanum/dont-create-logdir.patch new file mode 100644 index 000000000000..e348dd7b85ba --- /dev/null +++ b/nixpkgs/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 |