From e47be49c048332b508f0ea13eab361133fd31b4b Mon Sep 17 00:00:00 2001 From: RGBCube Date: Mon, 26 Feb 2024 23:59:53 +0300 Subject: [PATCH] Initial version --- flake.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..14af6c7 --- /dev/null +++ b/flake.nix @@ -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 + + + {charset="UTF-8";} + "Hello, internet!"<.title> + <.head> + <body> + <p>"What the fuck is this?"<.p> + <.body> + <.html>; + }; +}