This commit is contained in:
@@ -1,18 +1,28 @@
|
||||
{ system, self, pkgs, ... }:
|
||||
pkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
||||
affine-runtime = pkgs.runCommand "affine-runtime" {
|
||||
nativeBuildInputs = [
|
||||
pkgs.dash
|
||||
pkgs.curl
|
||||
pkgs.jq
|
||||
pkgs.nodejs_22
|
||||
(pkgs.postgresql_16.withPackages (ps: [ ps.pgvector ]))
|
||||
pkgs.redis
|
||||
];
|
||||
let
|
||||
runtimeInputs = [
|
||||
pkgs.dash
|
||||
pkgs.curl
|
||||
pkgs.jq
|
||||
pkgs.nodejs_22
|
||||
(pkgs.postgresql_16.withPackages (ps: [ ps.pgvector ]))
|
||||
pkgs.redis
|
||||
];
|
||||
check = name: extra: pkgs.runCommand name ({
|
||||
nativeBuildInputs = runtimeInputs;
|
||||
AFFINE_PACKAGE = self.packages.${system}.affine;
|
||||
AFFINE_CLIENT_TEST = ./test/client.cjs;
|
||||
} ''
|
||||
} // extra) ''
|
||||
dash ${./test/runtime.sh}
|
||||
touch "$out"
|
||||
'';
|
||||
in pkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
||||
affine-runtime = check "affine-runtime" {};
|
||||
affine-typography = check "affine-typography" {
|
||||
nativeBuildInputs = runtimeInputs ++ [ pkgs.playwright-driver ];
|
||||
PLAYWRIGHT_CORE_PATH = "${pkgs.playwright-driver}";
|
||||
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
|
||||
AFFINE_TYPOGRAPHY_TEST = ./test/typography.cjs;
|
||||
AFFINE_TYPOGRAPHY_PATCH = ../../../package/affine/gitea-document-typography.patch;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user