make tests pass
This commit is contained in:
parent
29f79c67d8
commit
77f70490df
9 changed files with 60 additions and 44 deletions
|
@ -1,4 +1,6 @@
|
|||
rec {
|
||||
let
|
||||
keyvalue = key: value: ''${key}="${toString value}"'';
|
||||
in rec {
|
||||
toHTML = elem:
|
||||
if builtins.typeOf elem == "string"
|
||||
then elem
|
||||
|
@ -9,9 +11,11 @@ rec {
|
|||
writeAttrs = attrs:
|
||||
toString (builtins.attrValues (
|
||||
builtins.mapAttrs (key: value:
|
||||
if (builtins.substring 0 2 key) == "__"
|
||||
if (builtins.isPath value)
|
||||
then keyvalue key (baseNameOf value)
|
||||
else if (builtins.substring 0 2 key) == "__"
|
||||
then ""
|
||||
else ''${key}="${toString value}"'')
|
||||
else keyvalue key value)
|
||||
attrs
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue