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,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