forked from mirrors/nixpkgs
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>
28 lines
543 B
Nix
28 lines
543 B
Nix
{ lib, buildGoModule, callPackage, fetchFromGitHub, woodpecker-frontend }:
|
|
let
|
|
common = callPackage ./common.nix { };
|
|
in
|
|
buildGoModule {
|
|
pname = "woodpecker-server";
|
|
inherit (common) version src ldflags postBuild;
|
|
vendorSha256 = null;
|
|
|
|
postPatch = ''
|
|
cp -r ${woodpecker-frontend} web/dist
|
|
'';
|
|
|
|
subPackages = "cmd/server";
|
|
|
|
CGO_ENABLED = 1;
|
|
|
|
passthru = {
|
|
inherit woodpecker-frontend;
|
|
|
|
updateScript = ./update.sh;
|
|
};
|
|
|
|
meta = common.meta // {
|
|
description = "Woodpecker Continuous Integration server";
|
|
};
|
|
}
|