2024-05-21 13:50:52 +00:00
|
|
|
{ ... }:
|
2024-05-15 12:27:18 +00:00
|
|
|
{
|
|
|
|
perSystem =
|
2024-05-21 13:50:52 +00:00
|
|
|
{ pkgs, config, ... }:
|
2024-05-18 09:56:35 +00:00
|
|
|
{
|
2024-05-21 13:50:52 +00:00
|
|
|
packages.webview-ui = pkgs.buildNpmPackage {
|
|
|
|
pname = "clan-webview-ui";
|
|
|
|
version = "0.0.1";
|
2024-05-20 17:34:27 +00:00
|
|
|
|
|
|
|
src = ./app;
|
|
|
|
|
2024-05-21 13:50:52 +00:00
|
|
|
npmDeps = pkgs.fetchNpmDeps {
|
|
|
|
src = ./app;
|
2024-06-08 16:14:07 +00:00
|
|
|
hash = "sha256-NauXhPRKC80yiAeyt5mEBLcPZw3aheZDYXx4vLvpRvI=";
|
2024-05-21 13:50:52 +00:00
|
|
|
};
|
|
|
|
# The prepack script runs the build script, which we'd rather do in the build phase.
|
|
|
|
npmPackFlags = [ "--ignore-scripts" ];
|
2024-05-20 17:34:27 +00:00
|
|
|
|
2024-05-21 13:50:52 +00:00
|
|
|
preBuild = ''
|
|
|
|
mkdir -p api
|
|
|
|
cat ${config.packages.clan-ts-api} > api/index.ts
|
2024-05-20 17:34:27 +00:00
|
|
|
'';
|
2024-05-15 12:27:18 +00:00
|
|
|
};
|
|
|
|
devShells.webview-ui = pkgs.mkShell {
|
2024-05-21 13:50:52 +00:00
|
|
|
inputsFrom = [ config.packages.webview-ui ];
|
2024-05-15 12:27:18 +00:00
|
|
|
shellHook = ''
|
2024-05-20 17:34:27 +00:00
|
|
|
mkdir -p ./app/api
|
|
|
|
cat ${config.packages.clan-ts-api} > ./app/api/index.ts
|
2024-05-15 12:27:18 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|