Format conversion
fromJson
Convert a JSON formatted string to a Nix expression.
Types:
- fromJson (
function str -> anything
):- (
str
): JSON formatted string to convert.
- (
Example:
fromToml
Convert a TOML formatted string to a Nix expression.
Types:
- fromToml (
function str -> anything
):- (
str
): TOML formatted string to convert.
- (
Example:
fromYaml
Convert a YAML formatted string to a Nix expression.
Types:
- fromYaml (
function str -> anything
):- (
str
): YAML formatted string to convert.
- (
Example:
toBashArray
Transform a list of arguments into a Bash array. It can be used for passing several arguments from Nix to Bash.
Types:
- toBashArray (
function (listOf strLike) -> package
):- (
listOf strLike
): list of arguments to transform.
- (
Example:
toBashMap
Transform a Nix attrsOf strLike
expression
into a Bash associative array (map).
It can be used for passing
several arguments from Nix
to Bash.
You can combine with toBashArray for more complex structures.
Types:
- toBashMap (
function (attrsOf strLike) -> package
):- (
attrsOf strLike
): expression to transform.
- (
Example:
toFileJson
Convert a Nix expression into a JSON file.
Types:
- toFileJson (
function str anything -> package
):- (
str
): Name of the created file. - (
anything
): Nix expression to convert.
- (
Example:
toFileJsonFromFileYaml
Use yq to transform a YAML file into its JSON equivalent.
Types:
- toFileJsonFromFileYaml (
function package -> package
):- (
package
): YAML file to transform.
- (
Example:
toFileYaml
Convert a Nix expression into a YAML file.
Types:
- toFileYaml (
function str anything -> package
):- (
str
): Name of the created file. - (
anything
): Nix expression to convert.
- (
Example: