This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
openssl,
|
||||
inputs,
|
||||
system,
|
||||
frontendPatches ? [ ./gitea-document-typography.patch ],
|
||||
frontendPatches ? [ ./gitea-document-typography.patch ./byok-model-picker.patch ],
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -151,7 +151,7 @@ let
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
frontend = stdenv.mkDerivation {
|
||||
frontend = stdenv.mkDerivation ({
|
||||
pname = "affine-frontend";
|
||||
inherit version src yarnOfflineCache;
|
||||
missingHashes = ./missing-hashes.json;
|
||||
@@ -188,13 +188,20 @@ let
|
||||
cp -R packages/frontend/apps/mobile/dist "$out/mobile"
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
} // lib.optionalAttrs (builtins.elem ./byok-model-picker.patch frontendPatches) {
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
AFFINE_SOURCE_DIR="$PWD" ${nodejs}/bin/node ${../../test/package/affine/test/model-picker.cjs}
|
||||
runHook postCheck
|
||||
'';
|
||||
});
|
||||
|
||||
frontendStatic = runCommand "affine-frontend-static-${version}" {
|
||||
inherit version;
|
||||
passthru = { inherit revision; };
|
||||
meta = {
|
||||
description = "Source-built AFFiNE web assets with document typography patches";
|
||||
description = "Source-built AFFiNE web assets with typography and BYOK model selection";
|
||||
license = [ lib.licenses.mit lib.licenses.mpl20 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user