mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +00:00
32aa830e10
* woodpecker-{agent,cli,server}: init at 0.15.3 * woodpecker-*: tweak packaging * Use 'callPackage' to import 'common.nix'. * Prefix the binaries with 'woodpecker-', removing the need for 'meta.mainProgram'. * Remove IFD in 'mkYarnPackage' by committing 'package.json'. * Simplify the server derivation, by not building it statically. * Expose 'woodpecker-frontend' as a package for overriding purposes. * Reduce package size for 'woodpecker-frontend' by just keeping the 'dist' folder. * Have common `ldflags` and `postBuild` values. * woodpecker-server: expose front-end with 'passthru' * woodpecker-server: add update script Co-authored-by: 06kellyjac <dev@j-k.io>
37 lines
739 B
Nix
37 lines
739 B
Nix
{ 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 ];
|
|
};
|
|
}
|