overlays: add 'woodpecker-2.0.0-rc.0'
The point was initially to quickly test the release candidate and wait for the official v2. Unfortunately I've encountered some issues trying to get the package working for the official version. So let's just roll with it for now...
This commit is contained in:
parent
49742deb18
commit
63314c9a4a
9 changed files with 3783 additions and 0 deletions
63
overlays/woodpecker-2.0.0-rc.0/frontend.nix
Normal file
63
overlays/woodpecker-2.0.0-rc.0/frontend.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ lib, buildPackages, callPackage, fetchFromGitHub, fetchYarnDeps, mkYarnPackage }:
|
||||
let
|
||||
common = callPackage ./common.nix { };
|
||||
|
||||
esbuild_0_18_20 = buildPackages.esbuild.overrideAttrs (_: rec {
|
||||
version = "0.18.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "evanw";
|
||||
repo = "esbuild";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-mED3h+mY+4H465m02ewFK/BgA1i/PQ+ksUNxBlgpUoI=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
|
||||
});
|
||||
in
|
||||
mkYarnPackage {
|
||||
pname = "woodpecker-frontend";
|
||||
inherit (common) version;
|
||||
|
||||
src = "${common.src}/web";
|
||||
|
||||
packageJSON = ./woodpecker-package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = ./yarn.lock;
|
||||
hash = common.yarnHash;
|
||||
};
|
||||
|
||||
ESBUILD_BINARY_PATH = lib.getExe esbuild_0_18_20;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace vite.config.ts \
|
||||
--replace 'src/' '/build/web/deps/woodpecker-ci/src/' \
|
||||
--replace 'node_modules/' '/build/web/node_modules/'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
yarn --offline 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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue