push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{
lib,
newScope,
python3,
recurseIntoAttrs,
}:
# Take packages from self first, then python.pkgs (and secondarily pkgs)
lib.makeScope (self: newScope (self.python.pkgs // self)) (self: {
python = python3;
buildbot-pkg = self.callPackage ./pkg.nix { };
buildbot-worker = self.callPackage ./worker.nix { };
buildbot = self.callPackage ./master.nix { };
buildbot-plugins = recurseIntoAttrs (self.callPackage ./plugins.nix { });
buildbot-ui = self.buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
buildbot-full = self.buildbot.withPlugins (
with self.buildbot-plugins;
[
www
console-view
waterfall-view
grid-view
wsgi-dashboards
badges
]
);
})

View File

@@ -0,0 +1,175 @@
{
lib,
stdenv,
buildPythonApplication,
fetchFromGitHub,
makeWrapper,
# Tie withPlugins through the fixed point here, so it will receive an
# overridden version properly
buildbot,
pythonOlder,
python,
twisted,
jinja2,
msgpack,
zope-interface,
sqlalchemy,
alembic,
python-dateutil,
txaio,
autobahn,
pyjwt,
pyyaml,
treq,
txrequests,
pypugjs,
boto3,
moto,
markdown,
lz4,
brotli,
zstandard,
setuptools-trial,
buildbot-worker,
buildbot-plugins,
buildbot-pkg,
parameterized,
git,
openssh,
setuptools,
croniter,
importlib-resources,
packaging,
unidiff,
nixosTests,
}:
let
withPlugins =
plugins:
buildPythonApplication {
pname = "${buildbot.pname}-with-plugins";
inherit (buildbot) version;
format = "other";
dontUnpack = true;
dontBuild = true;
doCheck = false;
nativeBuildInputs = [
makeWrapper
];
propagatedBuildInputs = plugins ++ buildbot.propagatedBuildInputs;
installPhase = ''
makeWrapper ${buildbot}/bin/buildbot $out/bin/buildbot \
--prefix PYTHONPATH : "${buildbot}/${python.sitePackages}:$PYTHONPATH"
ln -sfv ${buildbot}/lib $out/lib
'';
passthru = buildbot.passthru // {
withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
};
};
in
buildPythonApplication rec {
pname = "buildbot";
version = "4.3.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "buildbot";
repo = "buildbot";
rev = "v${version}";
hash = "sha256-yUtOJRI04/clCMImh5sokpj6MeBIXjEAdf9xnToqJZs=";
};
build-system = [
];
pythonRelaxDeps = [
"twisted"
];
propagatedBuildInputs = [
# core
twisted
jinja2
msgpack
zope-interface
sqlalchemy
alembic
python-dateutil
txaio
autobahn
pyjwt
pyyaml
setuptools
croniter
importlib-resources
packaging
unidiff
treq
brotli
zstandard
]
# tls
++ twisted.optional-dependencies.tls;
nativeCheckInputs = [
treq
txrequests
pypugjs
boto3
moto
markdown
lz4
setuptools-trial
buildbot-worker
buildbot-pkg
buildbot-plugins.www
parameterized
git
openssh
];
patches = [
# This patch disables the test that tries to read /etc/os-release which
# is not accessible in sandboxed builds.
./skip_test_linux_distro.patch
];
postPatch = ''
cd master
touch buildbot/py.typed
substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
'';
# TimeoutErrors on slow machines -> aarch64
doCheck = !stdenv.hostPlatform.isAarch64;
preCheck = ''
export PATH="$out/bin:$PATH"
'';
passthru = {
inherit withPlugins python;
updateScript = ./update.sh;
}
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
tests = {
inherit (nixosTests) buildbot;
};
};
meta = with lib; {
description = "Open-source continuous integration framework for automating software build, test, and release processes";
homepage = "https://buildbot.net/";
changelog = "https://github.com/buildbot/buildbot/releases/tag/v${version}";
teams = [ teams.buildbot ];
license = licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildPythonPackage,
isPy3k,
buildbot,
}:
buildPythonPackage {
format = "setuptools";
pname = "buildbot_pkg";
inherit (buildbot) src version;
postPatch = ''
cd pkg
# Their listdir function filters out `node_modules` folders.
# Do we have to care about that with Nix...?
substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" ""
'';
# No tests
doCheck = false;
pythonImportsCheck = [ "buildbot_pkg" ];
disabled = !isPy3k;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Packaging Helper";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
}

View File

@@ -0,0 +1,167 @@
{
lib,
buildPythonPackage,
fetchurl,
callPackage,
mock,
cairosvg,
klein,
jinja2,
buildbot-pkg,
}:
{
# this is exposed for potential plugins to use and for nix-update
inherit buildbot-pkg;
www = buildPythonPackage rec {
format = "setuptools";
pname = "buildbot_www";
inherit (buildbot-pkg) version;
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-mn55+Fb2cU2rNB5Nwt41nWXjcZfgd07ijYAAnZnnnwI=";
};
# Remove unnecessary circular dependency on buildbot
postPatch = ''
sed -i "s/'buildbot'//" setup.py
'';
buildInputs = [
buildbot-pkg
mock
];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot UI";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
console-view = buildPythonPackage rec {
pname = "buildbot_console_view";
inherit (buildbot-pkg) version;
format = "setuptools";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-VA6xqJBjD4XmQabTN8M+PLvfrG7Hq2ooxChtz2jAT8A=";
};
buildInputs = [ buildbot-pkg ];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Console View Plugin";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
waterfall-view = buildPythonPackage rec {
pname = "buildbot_waterfall_view";
inherit (buildbot-pkg) version;
format = "setuptools";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-c/Nmr0Uscalnndq72Y6jPM1JDs5OyOCERtuX/GXkxp8=";
};
buildInputs = [ buildbot-pkg ];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Waterfall View Plugin";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
grid-view = buildPythonPackage rec {
pname = "buildbot_grid_view";
inherit (buildbot-pkg) version;
format = "setuptools";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-AmY8RkFX0POmVpW71nNz4+dFbr0FHGhNR3RJymDNoaw=";
};
buildInputs = [ buildbot-pkg ];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Grid View Plugin";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
wsgi-dashboards = buildPythonPackage rec {
pname = "buildbot_wsgi_dashboards";
inherit (buildbot-pkg) version;
format = "setuptools";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-vofKxpIfbAs7HR43Y7ojHLQEn6/WIdjZPgZieBMsz74=";
};
buildInputs = [ buildbot-pkg ];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot WSGI dashboards Plugin";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
badges = buildPythonPackage rec {
pname = "buildbot_badges";
inherit (buildbot-pkg) version;
format = "setuptools";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-u7HF6X+ClT4rT3LJcTHXWi5oSxCKPXoUDH+QFRI2S0w=";
};
buildInputs = [ buildbot-pkg ];
propagatedBuildInputs = [
cairosvg
klein
jinja2
];
# No tests
doCheck = false;
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Badges Plugin";
maintainers = [ maintainers.julienmalka ];
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
};
}

View File

@@ -0,0 +1,11 @@
diff -Nur buildbot-0.9.6/master/buildbot/test/unit/test_buildbot_net_usage_data.py buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py
--- buildbot-0.9.6/master/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-04-19 16:57:02.000000000 +0200
+++ buildbot-0.9.6.patched/master/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-05-04 12:22:54.575762551 +0200
@@ -147,6 +147,7 @@
_sendBuildbotNetUsageData({'foo': 'bar'})
def test_linux_distro(self):
+ raise SkipTest("NixOS sandboxed builds hides /etc/os-release")
system = platform.system()
if system != "Linux":
raise SkipTest("test is only for linux")

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
set -eu -o pipefail
nix-update buildbot
nix-update --version=skip buildbot-plugins.www
nix-update --version=skip buildbot-plugins.console-view
nix-update --version=skip buildbot-plugins.waterfall-view
nix-update --version=skip buildbot-plugins.grid-view
nix-update --version=skip buildbot-plugins.wsgi-dashboards
nix-update --version=skip buildbot-plugins.badges

View File

@@ -0,0 +1,61 @@
{
lib,
buildPythonPackage,
buildbot,
stdenv,
# patch
coreutils,
# propagates
autobahn,
msgpack,
twisted,
# tests
parameterized,
psutil,
setuptools-trial,
# passthru
nixosTests,
}:
buildPythonPackage {
pname = "buildbot_worker";
inherit (buildbot) src version;
format = "setuptools";
postPatch = ''
cd worker
touch buildbot_worker/py.typed
substituteInPlace buildbot_worker/scripts/logwatcher.py \
--replace /usr/bin/tail "${coreutils}/bin/tail"
'';
nativeBuildInputs = [
setuptools-trial
];
propagatedBuildInputs = [
autobahn
msgpack
twisted
];
nativeCheckInputs = [
parameterized
psutil
];
passthru.tests = {
smoke-test = nixosTests.buildbot;
};
meta = with lib; {
homepage = "https://buildbot.net/";
description = "Buildbot Worker Daemon";
teams = [ teams.buildbot ];
license = licenses.gpl2;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "buildkite-test-collector-rust";
version = "0.1.3";
src = fetchFromGitHub {
owner = "buildkite";
repo = "test-collector-rust";
rev = "v${version}";
sha256 = "sha256-PF2TFfzWmHXLgTopzJ04dfnzd3Sc/A6Hduffz2guxmU=";
};
cargoHash = "sha256-jymWM0DCR6jUE1Kyhbx6HHf6YlrGu1THKTyDHaPG+Vs=";
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Rust adapter for Buildkite Test Analytics";
mainProgram = "buildkite-test-collector";
homepage = "https://buildkite.com/test-analytics";
license = with licenses; [ mit ];
maintainers = with maintainers; [ jfroche ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
buildGoModule,
enableUnfree ? true,
}:
buildGoModule rec {
pname = "drone.io${lib.optionalString (!enableUnfree) "-oss"}";
version = "2.26.0";
src = fetchFromGitHub {
owner = "harness";
repo = "drone";
rev = "v${version}";
sha256 = "sha256-rTMu3wd/drxALAZB0O5bAJuWdYsHSwwOD4nbAFIhXbg=";
};
vendorHash = "sha256-9jzhoFN7aAUgPxENPuGYR41gXLzSv1VtnTPB38heVlI=";
tags = lib.optionals (!enableUnfree) [
"oss"
"nolimit"
];
doCheck = false;
meta = with lib; {
description = "Continuous Integration platform built on container technology";
mainProgram = "drone-server";
homepage = "https://github.com/harness/drone";
maintainers = with maintainers; [
vdemeester
techknowlogick
];
license = with licenses; if enableUnfree then unfreeRedistributable else asl20;
};
}

View File

@@ -0,0 +1,23 @@
{ buildGoModule, callPackage }:
let
common = callPackage ./common.nix { };
in
buildGoModule {
pname = "woodpecker-agent";
inherit (common)
version
src
ldflags
postInstall
vendorHash
;
subPackages = "cmd/agent";
env.CGO_ENABLED = 0;
meta = common.meta // {
description = "Woodpecker Continuous Integration agent";
mainProgram = "woodpecker-agent";
};
}

View File

@@ -0,0 +1,39 @@
{
buildGoModule,
callPackage,
installShellFiles,
lib,
stdenv,
}:
let
common = callPackage ./common.nix { };
in
buildGoModule {
pname = "woodpecker-cli";
inherit (common)
version
src
ldflags
vendorHash
;
subPackages = "cmd/cli";
nativeBuildInputs = [ installShellFiles ];
env.CGO_ENABLED = 0;
postInstall = ''
${common.postInstall}
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd woodpecker-cli \
--bash <($out/bin/woodpecker-cli completion bash) \
--fish <($out/bin/woodpecker-cli completion fish ) \
--zsh <($out/bin/woodpecker-cli completion zsh)
'';
meta = common.meta // {
description = "Command line client for the Woodpecker Continuous Integration server";
mainProgram = "woodpecker-cli";
};
}

View File

@@ -0,0 +1,50 @@
{ lib, fetchzip }:
let
version = "3.10.0";
srcHash = "sha256-Z9EGm14q9DySZ0lgw/wwam3NjvicltWBkVJ3cwi/eds=";
# The tarball contains vendored dependencies
vendorHash = null;
in
{
inherit version vendorHash;
src = fetchzip {
url = "https://github.com/woodpecker-ci/woodpecker/releases/download/v${version}/woodpecker-src.tar.gz";
hash = srcHash;
stripRoot = false;
};
postInstall = ''
cd $out/bin
for f in *; do
if [ "$f" = cli ]; then
# Issue a warning to the user if they call the deprecated executable
cat >woodpecker << EOF
#!/bin/sh
echo 'WARNING: calling \`woodpecker\` is deprecated, use \`woodpecker-cli\` instead.' >&2
$out/bin/woodpecker-cli "\$@"
EOF
chmod +x woodpecker
patchShebangs woodpecker
fi
mv -- "$f" "woodpecker-$f"
done
cd -
'';
ldflags = [
"-s"
"-w"
"-X go.woodpecker-ci.org/woodpecker/v3/version.Version=${version}"
];
meta = with lib; {
homepage = "https://woodpecker-ci.org/";
changelog = "https://github.com/woodpecker-ci/woodpecker/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [
ambroisie
techknowlogick
];
};
}

View File

@@ -0,0 +1,27 @@
{ buildGoModule, callPackage }:
let
common = callPackage ./common.nix { };
in
buildGoModule {
pname = "woodpecker-server";
inherit (common)
version
src
ldflags
postInstall
vendorHash
;
subPackages = "cmd/server";
env.CGO_ENABLED = 1;
passthru = {
updateScript = ./update.sh;
};
meta = common.meta // {
description = "Woodpecker Continuous Integration server";
mainProgram = "woodpecker-server";
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix wget jq nix-prefetch
# shellcheck shell=bash
if [ -n "$GITHUB_TOKEN" ]; then
TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN")
fi
if [[ $# -gt 1 || $1 == -* ]]; then
echo "Regenerates packaging data for the woodpecker packages."
echo "Usage: $0 [git release tag]"
exit 1
fi
cd "$(dirname "$0")"
version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(wget -q -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/woodpecker-ci/woodpecker/releases?per_page=1" | jq -r '.[0].tag_name')"
fi
# strip leading "v"
version="${version#v}"
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" common.nix
# Woodpecker repository
src_hash=$(nix-prefetch-url --type sha256 --unpack "https://github.com/woodpecker-ci/woodpecker/releases/download/v$version/woodpecker-src.tar.gz")
src_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$src_hash")
sed -i -E -e "s#srcHash = \".*\"#srcHash = \"$src_hash\"#" common.nix