depot/third_party/nixpkgs/pkgs/development/tools/continuous-integration/woodpecker/common.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

37 lines
823 B
Nix

{ lib, fetchFromGitHub }:
let
version = "1.0.0";
srcHash = "sha256-1HSSHR3myn1x75kO/70w1p21a7dHwFiC7iAH/KRoYsE=";
vendorHash = "sha256-UFTK3EK8eYB3/iKxycCIkSHdLsKGnDkYCpoFJSajm5M=";
yarnHash = "sha256-QNeQwWU36A05zaARWmqEOhfyZRW68OgF4wTonQLYQfs=";
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 github.com/woodpecker-ci/woodpecker/version.Version=${version}"
];
meta = with lib; {
homepage = "https://woodpecker-ci.org/";
license = licenses.asl20;
maintainers = with maintainers; [ ambroisie techknowlogick ];
};
}