LinuxCommandLibrary

nix3-run

Run an application from a Nix flake.

TLDR

Run the default application in the flake in the current directory

$ nix run
copy


Run a command whose name matches the package name from nixpkgs (if you want a different command from that package, see tldr nix3 shell)
$ nix run nixpkgs#[pkg]
copy


Run a command with provided arguments
$ nix run nixpkgs#[vim] -- [path/to/file]
copy


Run from a remote repository
$ nix run [remote_name]:[owner]/[repo]
copy


Run from a remote repository using a specific tag, revision or branch
$ nix run [remote_name]:[owner]/[repo]/[reference]
copy


Run from a remote repository specifying a subdirectory and a program
$ nix run "[remote_name]:[owner]/[repo]?dir=[dir_name]#[app]"
copy


Run the flake of a GitHub pull request
$ nix run github:[owner]/[repo]/pull/[number]/head
copy

Copied to clipboard