This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
stdenvNoCC,
|
||||
fetchzip,
|
||||
runCommand,
|
||||
config,
|
||||
makeWrapper,
|
||||
nodejs,
|
||||
@@ -13,6 +14,7 @@
|
||||
openssl,
|
||||
inputs,
|
||||
system,
|
||||
frontendPatches ? [ ./gitea-document-typography.patch ],
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -153,6 +155,7 @@ let
|
||||
pname = "affine-frontend";
|
||||
inherit version src yarnOfflineCache;
|
||||
missingHashes = ./missing-hashes.json;
|
||||
patches = frontendPatches;
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
@@ -186,6 +189,23 @@ let
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
frontendStatic = runCommand "affine-frontend-static-${version}" {
|
||||
inherit version;
|
||||
passthru = { inherit revision; };
|
||||
meta = {
|
||||
description = "Source-built AFFiNE web assets with document typography patches";
|
||||
license = [ lib.licenses.mit lib.licenses.mpl20 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
} ''
|
||||
mkdir -p "$out/admin" "$out/mobile" "$out/licenses"
|
||||
cp -RL ${frontend}/web/. "$out/"
|
||||
cp -RL ${frontend}/admin/. "$out/admin/"
|
||||
cp -RL ${frontend}/mobile/. "$out/mobile/"
|
||||
cp ${src}/LICENSE ${src}/LICENSE-MIT "$out/licenses/"
|
||||
cp ${src}/packages/backend/server/LICENSE "$out/licenses/AFFINE-EE-and-MPL"
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "affine";
|
||||
@@ -282,7 +302,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit frontend native prismaEngines prismaQueryEngine prismaSchemaEngine yarnOfflineCache18;
|
||||
inherit frontend frontendStatic native prismaEngines prismaQueryEngine prismaSchemaEngine yarnOfflineCache18;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user