From 8f1e184a29ba19fc4cd5076024422855a4510ce1 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Wed, 28 Feb 2024 14:01:51 +0300 Subject: [PATCH] Make raw logic simpler --- escape.nix | 4 ++-- flake.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/escape.nix b/escape.nix index 934fe53..d207702 100644 --- a/escape.nix +++ b/escape.nix @@ -44,12 +44,12 @@ lib: let else lib.strings.escapeXML string; - raw = string: derivation { + raw = string: toString (derivation { name = "_"; system = "_"; builder = "_"; rawContent = "${startMarker}${yeet string}${endMarker}"; - }; + }); in { inherit escape raw; } diff --git a/flake.nix b/flake.nix index 7ee5758..32613b1 100644 --- a/flake.nix +++ b/flake.nix @@ -43,8 +43,8 @@ outPath = dottedNameToTag name; __functor = this: next: - # Not an attrset or an escaped one. Just toString it and add it onto the HTML. - if builtins.isAttrs next -> lib.hasSuffix "-_" next.outPath or "" + # Not an attrset. Just add it onto the HTML. + if !builtins.isAttrs next then this // { outPath = (toString this) + escape (toString next); }