blob: 191d66ad20ae57e00224513ca379a8a2ec536dc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{ pkgs ? import <nixpkgs> {}}:
let
filtFn = root: path: type:
let
name = baseNameOf path;
hidden = builtins.match "[._].+" name != null;
nix = builtins.match ".*\\.nix" name != null;
r =
!hidden &&
!nix &&
true;
in builtins.trace (path + ": " + (if r then "yes" else "no")) r;
fltsrc = builtins.filterSource (filtFn (builtins.toPath ./. + "/"));
site = (import ./compiler { boot = pkgs; }).site;
src = fltsrc ./src;
in pkgs.runCommand "site" { LANG = "C.UTF-8"; } ''
${site}/bin/site --source ${src} --output $out build
${site}/bin/site --source ${src} --output $out check
''
|