LinuxCommandLibrary

nix-run

runs programs from Nix packages

TLDR

Run package from nixpkgs

$ nix run nixpkgs#[hello]
copy
Run from flake
$ nix run [.#default]
copy
Run with arguments
$ nix run nixpkgs#[cowsay] -- "[Hello]"
copy
Run from GitHub
$ nix run [github:owner/repo]
copy
Run specific app
$ nix run [.#apps.x86_64-linux.default]
copy

SYNOPSIS

nix run [options] installable [-- args]

DESCRIPTION

nix run runs programs from Nix packages. No installation required.
The tool fetches and runs packages. Temporary execution without pollution.

PARAMETERS

INSTALLABLE

Flake reference to run.
ARGS
Arguments to pass to program.
--impure
Allow impure evaluation.
--help
Display help information.

CAVEATS

Requires flakes enabled. Downloads on first run. Network dependent.

HISTORY

nix run is part of the new Nix CLI for running packages without installation.

SEE ALSO

nix(1), nix-shell(1), nix-build(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community