mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-24 22:47:43 +00:00
Initial version
This commit is contained in:
commit
e47be49c04
1 changed files with 40 additions and 0 deletions
40
flake.nix
Normal file
40
flake.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
outputs = { self }: {
|
||||
escape = s: s; # TODO
|
||||
|
||||
__findFile = _: name: if builtins.substring 0 1 name == "." then {
|
||||
_type = "end";
|
||||
_name = builtins.substring 1 (builtins.stringLength name) name;
|
||||
} else if builtins.substring (builtins.stringLength name - 1) 1 name == "." then {
|
||||
_type = "lone";
|
||||
_name = builtins.substring 0 (builtins.stringLength name - 1) name;
|
||||
} else {
|
||||
_type = "start";
|
||||
_name = name;
|
||||
|
||||
_accum = [];
|
||||
__functor = let
|
||||
impl = this: next: if
|
||||
next._type or null == "end" &&
|
||||
next._name == this._name
|
||||
then
|
||||
this._accum
|
||||
else this // {
|
||||
_accum = this._accum ++ [ next ];
|
||||
__functor = impl;
|
||||
};
|
||||
in impl;
|
||||
};
|
||||
|
||||
result = let inherit (self) __findFile; in
|
||||
<html>
|
||||
<head>
|
||||
<meta.>{charset="UTF-8";}
|
||||
<title>"Hello, internet!"<.title>
|
||||
<.head>
|
||||
<body>
|
||||
<p>"What the fuck is this?"<.p>
|
||||
<.body>
|
||||
<.html>;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue