public snapshot · areas/examples/raft-nib/ · system@main · commit da2bf624f03d · shared 2026-11-23T17:23:12Z· frozen: this page does not change when the repository does
1 # raft-nib's site (deploy name `raft`) as a Nix package (registered in
2 # system/nix/default.nix). The server is nib-site's: a std-only static file
3 # server that reads SITE_DIR, so this package is the committed site/ plus a
4 # wrapper that points that server at it. Nothing is generated at build time;
5 # gen/build.py writes site/ from real runs, and the commit is the record.
6 { lib, runCommand, makeWrapper, python3, nib-site }:
7
8 let
9 site = lib.fileset.toSource { root = ./.; fileset = ./site; };
10 checker = lib.fileset.toSource { root = ./.; fileset = ./gen/check_site.py; };
11 pkg = runCommand "raft-nib-site" {
12 nativeBuildInputs = [ makeWrapper ];
13 passthru.checks.site = runCommand "raft-nib-site-check" { nativeBuildInputs = [ python3 ]; } ''
14 python3 ${checker}/gen/check_site.py ${site}/site
15 touch $out
16 '';
17 } ''
18 mkdir -p $out/share/raft-nib $out/bin
19 cp -r ${site}/site $out/share/raft-nib/site
20 makeWrapper ${nib-site}/bin/nib-site $out/bin/raft-nib \
21 --set SITE_DIR $out/share/raft-nib/site
22 '';
23 in
24 pkg
snapshot of da2bf624f03d · 2925 files · browse