The point was initially to quickly test the release candidate and wait for the official v2. Unfortunately I've encountered some issues trying to get the package working for the official version. So let's just roll with it for now...
38 lines
931 B
Nix
38 lines
931 B
Nix
{ lib, fetchFromGitHub }:
|
|
let
|
|
version = "2.0.0-rc.0";
|
|
srcHash = "sha256-n4rJNBgOQV4rKoFirHW63q520HF8PYBmtwx7iEmht+E=";
|
|
vendorHash = "sha256-/GOwsrYzVoYjJZ27sp/gzp1N3de6P16v+kHY1u1wTKs=";
|
|
yarnHash = "sha256-IZbhn95wBCeh0DJDe+S/9Vqx4CHAQ+4QA5jp6xc9hmY=";
|
|
in
|
|
{
|
|
inherit version yarnHash vendorHash;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "woodpecker-ci";
|
|
repo = "woodpecker";
|
|
rev = "v${version}";
|
|
hash = srcHash;
|
|
};
|
|
|
|
postInstall = ''
|
|
cd $out/bin
|
|
for f in *; do
|
|
mv -- "$f" "woodpecker-$f"
|
|
done
|
|
cd -
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X go.woodpecker-ci.org/woodpecker/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 adamcstephens ];
|
|
};
|
|
}
|