diff options
Diffstat (limited to 'pkgs/development/tools/continuous-integration/woodpecker/common.nix')
-rw-r--r-- | pkgs/development/tools/continuous-integration/woodpecker/common.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/tools/continuous-integration/woodpecker/common.nix b/pkgs/development/tools/continuous-integration/woodpecker/common.nix new file mode 100644 index 0000000000000..932fa934b1bc7 --- /dev/null +++ b/pkgs/development/tools/continuous-integration/woodpecker/common.nix @@ -0,0 +1,36 @@ +{ lib, fetchFromGitHub }: +let + version = "0.15.3"; + srcSha256 = "sha256-HOOH3H2SXLcT2oW/xL80TO+ZSI+Haulnznpb4hlCQow="; + yarnSha256 = "sha256-x9g0vSoexfknqLejgcNIigmkFnqYsmhcQNTOStcj68o="; +in +{ + inherit version yarnSha256; + + src = fetchFromGitHub { + owner = "woodpecker-ci"; + repo = "woodpecker"; + rev = "v${version}"; + sha256 = srcSha256; + }; + + postBuild = '' + cd $GOPATH/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 ]; + }; +} |