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

nix

import { nix } from "https://garn.io/ts/v0.0.20/mod.ts";

§Functions

nix.escapeShellArg
nix.getPathOrError
nix.joinNixStrings
nix.nixAttrSet

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

nix.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.

nix.nixList

Turns a javascript array of NixExpressions into a Nix list.

nix.nixRaw

A template literal function to construct NixExpressions from raw strings.

nix.nixStrLit

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

nix.renderFlakeFile

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

nix.renderNixExpression

Converts a NixExpression to a string representing that Nix expression.

nix.toHumanReadable

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

§Type Aliases

nix.NixExpression

An opaque type representing a Nix expression.

nix.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.