fix(ui): disabled storybook derivation

Something about passing orientation in any of the Form stories is causing the browser to crash

`npm run test-storybook-static` works fine in the devshell.

Disabling for now as it's slowing down development.
This commit is contained in:
Brian McGee
2025-07-03 17:43:46 +01:00
parent 7939cfc9a9
commit 9003204b54
2 changed files with 55 additions and 53 deletions

View File

@@ -3,11 +3,9 @@
nodejs_22,
importNpmLock,
clan-ts-api,
playwright-driver,
ps,
fonts,
}:
buildNpmPackage (finalAttrs: {
buildNpmPackage (_finalAttrs: {
pname = "clan-app-ui";
version = "0.0.1";
nodejs = nodejs_22;
@@ -25,35 +23,39 @@ buildNpmPackage (finalAttrs: {
cp -r ${fonts} ".fonts"
'';
passthru = rec {
storybook = buildNpmPackage {
pname = "${finalAttrs.pname}-storybook";
inherit (finalAttrs)
version
nodejs
src
npmDeps
npmConfigHook
preBuild
;
nativeBuildInputs = finalAttrs.nativeBuildInputs ++ [
ps
];
npmBuildScript = "test-storybook-static";
env = finalAttrs.env // {
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
PLAYWRIGHT_BROWSERS_PATH = "${playwright-driver.browsers.override {
withChromiumHeadlessShell = true;
}}";
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE = "ubuntu-24.04";
};
postBuild = ''
mv storybook-static $out
'';
};
};
# todo figure out why this fails only inside of Nix
# Something about passing orientation in any of the Form stories is causing the browser to crash
# `npm run test-storybook-static` works fine in the devshell
#
# passthru = rec {
# storybook = buildNpmPackage {
# pname = "${finalAttrs.pname}-storybook";
# inherit (finalAttrs)
# version
# nodejs
# src
# npmDeps
# npmConfigHook
# preBuild
# ;
#
# nativeBuildInputs = finalAttrs.nativeBuildInputs ++ [
# ps
# ];
#
# npmBuildScript = "test-storybook-static";
#
# env = finalAttrs.env // {
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
# PLAYWRIGHT_BROWSERS_PATH = "${playwright-driver.browsers.override {
# withChromiumHeadlessShell = true;
# }}";
# PLAYWRIGHT_HOST_PLATFORM_OVERRIDE = "ubuntu-24.04";
# };
#
# postBuild = ''
# mv storybook-static $out
# '';
# };
# };
})