c-base-nix-website/test-build.nix
2025-09-26 08:02:47 +02:00

29 lines
920 B
Nix

# Simple test to verify our Nix web development setup works
let
pkgs = import <nixpkgs> {};
# Import our modules
html = import ./src/core/html.nix { inherit pkgs; };
css = import ./src/core/css.nix { inherit pkgs; };
components = import ./src/core/components.nix { inherit pkgs html css; };
content = import ./src/data/content.nix;
# Test page generation
testPage = import ./src/pages/index.nix { inherit components content; };
testStyles = import ./src/styles/main.nix;
in {
# Test outputs
htmlOutput = testPage.html;
cssOutput = testStyles.css;
# Verification
isValid = builtins.isString testPage.html && builtins.isString testStyles.css;
# Component test
componentTest = {
headerExists = builtins.hasAttr "terminalHeader" components;
heroExists = builtins.hasAttr "heroSection" components;
footerExists = builtins.hasAttr "terminalFooter" components;
};
}