This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/ci/woodpecker/frontend.nix
2023-08-22 13:10:40 +01:00

49 lines
877 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 = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
configurePhase = ''
cp -r $node_modules node_modules
'';
buildPhase = ''
runHook preBuild
yarn build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -R ./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";
};
}