2023-03-31 17:04:02 +03:00
|
|
|
{ callPackage, fetchYarnDeps, mkYarnPackage }:
|
|
|
|
|
2023-03-09 14:15:44 +03:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2023-03-31 17:04:02 +03:00
|
|
|
patchPhase = ''
|
|
|
|
cd src/assets/locales
|
|
|
|
rm $(ls | grep -v en.json)
|
|
|
|
cd -
|
|
|
|
'';
|
|
|
|
|
2023-03-09 14:15:44 +03:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|