Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as mod from "https://garn.io/ts/v0.0.16/nix.ts";

§Functions

nixAttrSet

Turns a javascript object of NixExpressions into a Nix attribute set. Filters out undefined values.

nixFlakeDep

Returns a NixExpression that renders as an identifier that refers to a flake input. At the same time it registers the flake input as a dependency, so that it'll be included in the inputs of the generated flake file. See renderFlakeFile for an example.

nixList

Turns a javascript array of NixExpressions into a Nix list.

nixRaw

A template literal function to construct NixExpressions from raw strings.

nixStrLit

Returns a NixExpression which represents a Nix string literal, but with all typescript interpolations properly escaped and interpolated.

renderFlakeFile

Renders the nix expression as the outputs of a flake file with all flake deps provided as inputs.

renderNixExpression

Converts a NixExpression to a string representing that Nix expression.

toHumanReadable

Converts a NixExpression to a (hopefully concise) human readable string with incidental dependencies snipped out with "[...]"

§Type Aliases

NixExpression

An opaque type representing a Nix expression.

NixStrLitInterpolatable

A union of types that are allowed to be interpolated into the nixStrLit template literal function. This is also used in some higher level functions, such as Environment.shell.