Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{ 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
];
};
}