mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 11:03:57 +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>
41 lines
825 B
Nix
41 lines
825 B
Nix
{ lib, callPackage, fetchFromGitHub, fetchYarnDeps, mkYarnPackage }:
|
|
let
|
|
common = callPackage ./common.nix { };
|
|
in
|
|
mkYarnPackage {
|
|
pname = "woodpecker-frontend";
|
|
inherit (common) version;
|
|
|
|
src = "${common.src}/web";
|
|
|
|
packageJSON = ./woodpecker-package.json;
|
|
offlineCache = fetchYarnDeps {
|
|
yarnLock = "${common.src}/web/yarn.lock";
|
|
sha256 = common.yarnSha256;
|
|
};
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
yarn build
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
cp -R deps/woodpecker-ci/dist $out
|
|
echo "${common.version}" > "$out/version"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
# Do not attempt generating a tarball for woodpecker-frontend again.
|
|
doDist = false;
|
|
|
|
meta = common.meta // {
|
|
description = "Woodpecker Continuous Integration server frontend";
|
|
};
|
|
}
|