diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-10-07 16:38:46 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-10-07 17:29:21 +0200 |
commit | 7ae181e09835a38d88990f18b8f0ed42835959ee (patch) | |
tree | c39d1c51c70f0b3a5f274e2fa489d8c7a92117e8 /default.nix | |
download | hakyll-template-7ae181e09835a38d88990f18b8f0ed42835959ee.tar.gz |
Initial commit
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..191d66a --- /dev/null +++ b/default.nix @@ -0,0 +1,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 +'' |