From 4eb87f4d945fa33a4c58ade2a42bf2642c54f2b9 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Wed, 2 Sep 2026 07:43:20 -0700 Subject: [PATCH] go-neb: drop Upstream discontinued it: https://github.com/matrix-org/go-neb --- nixos/modules/services/networking/go-neb.nix | 92 ++------------------ nixos/tests/all-tests.nix | 1 - nixos/tests/go-neb.nix | 54 ------------ pkgs/by-name/go/go-neb/package.nix | 41 --------- pkgs/top-level/aliases.nix | 1 + 5 files changed, 8 insertions(+), 181 deletions(-) delete mode 100644 nixos/tests/go-neb.nix delete mode 100644 pkgs/by-name/go/go-neb/package.nix diff --git a/nixos/modules/services/networking/go-neb.nix b/nixos/modules/services/networking/go-neb.nix index ae0ce8147e62..1e900c729acb 100644 --- a/nixos/modules/services/networking/go-neb.nix +++ b/nixos/modules/services/networking/go-neb.nix @@ -1,88 +1,10 @@ +{ lib, ... }: + { - config, - lib, - pkgs, - ... -}: -let - cfg = config.services.go-neb; - - settingsFormat = pkgs.formats.yaml { }; - configFile = settingsFormat.generate "config.yaml" cfg.config; -in -{ - options.services.go-neb = { - enable = lib.mkEnableOption "an extensible matrix bot written in Go"; - - bindAddress = lib.mkOption { - type = lib.types.str; - description = "Port (and optionally address) to listen on."; - default = ":4050"; - }; - - secretFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - default = null; - example = "/run/keys/go-neb.env"; - description = '' - Environment variables from this file will be interpolated into the - final config file using envsubst with this syntax: `$ENVIRONMENT` - or `''${VARIABLE}`. - The file should contain lines formatted as `SECRET_VAR=SECRET_VALUE`. - This is useful to avoid putting secrets into the nix store. - ''; - }; - - baseUrl = lib.mkOption { - type = lib.types.str; - description = "Public-facing endpoint that can receive webhooks."; - }; - - config = lib.mkOption { - inherit (settingsFormat) type; - description = '' - Your {file}`config.yaml` as a Nix attribute set. - See [config.sample.yaml](https://github.com/matrix-org/go-neb/blob/master/config.sample.yaml) - for possible options. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.services.go-neb = - let - finalConfigFile = if cfg.secretFile == null then configFile else "/var/run/go-neb/config.yaml"; - in - { - description = "Extensible matrix bot written in Go"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - environment = { - BASE_URL = cfg.baseUrl; - BIND_ADDRESS = cfg.bindAddress; - CONFIG_FILE = finalConfigFile; - }; - - serviceConfig = { - ExecStartPre = lib.optional (cfg.secretFile != null) ( - "+" - + pkgs.writeShellScript "pre-start" '' - umask 077 - export $(xargs < ${cfg.secretFile}) - ${pkgs.envsubst}/bin/envsubst -i "${configFile}" > ${finalConfigFile} - chown go-neb ${finalConfigFile} - '' - ); - RuntimeDirectory = "go-neb"; - ExecStart = "${pkgs.go-neb}/bin/go-neb"; - User = "go-neb"; - DynamicUser = true; - }; - }; - }; - - meta.maintainers = with lib.maintainers; [ - hexa - maralorn + imports = [ + (lib.mkRemovedOptionModule [ "services" "go-neb" ] '' + The Go-NEB project was discontinued by Matrix.org and archived in June + 2023. Use matrix-hookshot or another maintained Matrix bot instead. + '') ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e20cfb1ec78e..f7aa55cc7b47 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -720,7 +720,6 @@ in go-camo = runTest ./go-camo.nix; go-csp-collector = runTest ./go-csp-collector.nix; go-httpbin = runTest ./go-httpbin.nix; - go-neb = runTest ./go-neb.nix; goatcounter = runTest ./goatcounter.nix; gobgpd = runTest ./gobgpd.nix; gocd-agent = runTest ./gocd-agent.nix; diff --git a/nixos/tests/go-neb.nix b/nixos/tests/go-neb.nix deleted file mode 100644 index 4aea2d436760..000000000000 --- a/nixos/tests/go-neb.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - pkgs, - ... -}: -{ - name = "go-neb"; - meta = with pkgs.lib.maintainers; { - maintainers = [ - hexa - maralorn - ]; - }; - - nodes = { - server = { - services.go-neb = { - enable = true; - baseUrl = "http://localhost"; - secretFile = pkgs.writeText "secrets" "ACCESS_TOKEN=changeme"; - config = { - clients = [ - { - UserId = "@test:localhost"; - AccessToken = "$ACCESS_TOKEN"; - HomeServerUrl = "http://localhost"; - Sync = false; - AutoJoinRooms = false; - DisplayName = "neverbeseen"; - } - ]; - services = [ - { - ID = "wikipedia_service"; - Type = "wikipedia"; - UserID = "@test:localhost"; - Config = { }; - } - ]; - }; - }; - }; - }; - - testScript = '' - start_all() - server.wait_for_unit("go-neb.service") - server.wait_until_succeeds("curl -fL http://localhost:4050/services/hooks/d2lraXBlZGlhX3NlcnZpY2U") - server.succeed( - "journalctl -eu go-neb -o cat | grep -q service_id=wikipedia_service", - "grep -q changeme /var/run/go-neb/config.yaml", - ) - ''; - -} diff --git a/pkgs/by-name/go/go-neb/package.nix b/pkgs/by-name/go/go-neb/package.nix deleted file mode 100644 index fb95f4629cd4..000000000000 --- a/pkgs/by-name/go/go-neb/package.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - stdenv, - buildGoModule, - fetchFromGitHub, - nixosTests, - olm, -}: - -buildGoModule { - pname = "go-neb"; - version = "unstable-2021-07-21"; - src = fetchFromGitHub { - owner = "matrix-org"; - repo = "go-neb"; - rev = "8916c80f8ce1732f64b50f9251242ca189082e76"; - sha256 = "sha256-kuH4vbvS4G1bczxUdY4bd4oL4pIZzuueUxdEp4xuzJM="; - }; - - subPackages = [ "." ]; - - buildInputs = [ olm ]; - - vendorHash = "sha256-5Vg7aUkqiFIQuxmsDOJjvXoeA5NjMoBoD0XBhC+o4GA="; - - doCheck = false; - - passthru.tests.go-neb = nixosTests.go-neb; - - meta = { - broken = stdenv.hostPlatform.isDarwin; - description = "Extensible matrix bot written in Go"; - mainProgram = "go-neb"; - homepage = "https://github.com/matrix-org/go-neb"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ - hexa - maralorn - ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 35cbb274e051..58675942231d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1041,6 +1041,7 @@ mapAliases { gns3Packages = throw "'gns3Packages' has been removed. Use 'gns3-gui' and 'gns3-server' instead."; # Added 2026-01-18 gnu-cobol = throw "'gnu-cobol' has been renamed to/replaced by 'gnucobol'"; # Converted to throw 2025-10-27 gnubik = throw "'gnubik' has been removed due to lack of maintenance upstream and its dependency on GTK 2"; # Added 2025-09-16 + go-neb = throw "'go-neb' has been removed because upstream discontinued and archived the project; use matrix-hookshot or another maintained Matrix bot instead."; # Added 2026-09-02 go-thumbnailer = throw "'go-thumbnailer' has been renamed to/replaced by 'thud'"; # Converted to throw 2025-10-27 go-upower-notify = throw "'go-upower-notify' has been renamed to/replaced by 'upower-notify'"; # Converted to throw 2025-10-27 go_1_23 = throw "Go 1.23 is end-of-life and 'go_1_23' has been removed. Please use a newer Go toolchain."; # Added 2025-08-13