Merge pull request #251302 from Mic92/buildbot

nixos/buildbot: support reload, buildbot-www-react: init 3.9
This commit is contained in:
Lassulus 2023-09-09 19:09:06 +02:00 committed by GitHub
commit 72160fbdc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

View File

@ -272,7 +272,13 @@ in {
Group = cfg.group;
WorkingDirectory = cfg.home;
# NOTE: call twistd directly with stdout logging for systemd
ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${tacFile}";
ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${cfg.buildbotDir}/buildbot.tac";
# To reload on upgrade, set the following in your configuration:
# systemd.services.buildbot-master.reloadIfChanged = true;
ExecReload = [
"${pkgs.coreutils}/bin/ln -sf ${tacFile} ${cfg.buildbotDir}/buildbot.tac"
"${pkgs.coreutils}/bin/kill -HUP $MAINPID"
];
};
};
};

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg }:
{ lib, buildPythonPackage, fetchPypi, fetchurl, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg, unzip, zip }:
{
# this is exposed for potential plugins to use and for nix-update
inherit buildbot-pkg;
@ -29,6 +29,42 @@
};
};
www-react = buildPythonPackage rec {
pname = "buildbot-www-react";
inherit (buildbot-pkg) version;
format = "wheel";
# fetchpypy returns a 404 for the wheel?
# normal source release doesn't have any assets
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/buildbot_www_react-${version}-py3-none-any.whl";
hash = "sha256-pEzuMiDhGQtIWQm80lgKIcTjnS7Z8UJhH9plJup5O84=";
};
# Remove unneccessary circular dependency on buildbot
postPatch = ''
pushd dist
unzip buildbot_www_react-${version}-py3-none-any.whl
sed -i "s/Requires-Dist: buildbot//" buildbot_www_react-${version}.dist-info/METADATA
chmod -R u+w buildbot_www_react-${version}-py3-none-any.whl
zip -r buildbot_www_react-${version}-py3-none-any.whl buildbot_www_react-${version}.dist-info
popd
'';
buildInputs = [ buildbot-pkg ];
nativeBuildInputs = [ unzip zip ];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot UI (React)";
maintainers = with maintainers; [ mic92 ];
license = licenses.gpl2Only;
};
};
console-view = buildPythonPackage rec {
pname = "buildbot-console-view";
inherit (buildbot-pkg) version;

View File

@ -6,6 +6,7 @@ nix-update buildbot
nix-update --version=skip buildbot-worker
nix-update --version=skip buildbot-plugins.buildbot-pkg
nix-update --version=skip buildbot-plugins.www
nix-update --version=skip buildbot-plugins.www-react
nix-update --version=skip buildbot-plugins.console-view
nix-update --version=skip buildbot-plugins.waterfall-view
nix-update --version=skip buildbot-plugins.grid-view