HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

nix edit — Open the Nix expression of a Nix package in `$EDITOR`. More information: <https://nix.dev/manual/nix

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thenix editcommandcliexpressionopennix

Problem

How to use the nix edit command: Open the Nix expression of a Nix package in $EDITOR. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-edit.html>.

Solution

nix edit — Open the Nix expression of a Nix package in $EDITOR. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-edit.html>.

Open the source of the Nix expression of a package from nixpkgs in your $EDITOR:
nix edit {{nixpkgs#pkg}}


Dump the source of a package to stdout:
EDITOR=cat nix edit {{nixpkgs#pkg}}

Code Snippets

Open the source of the Nix expression of a package from nixpkgs in your `$EDITOR`

nix edit {{nixpkgs#pkg}}

Dump the source of a package to `stdout`

EDITOR=cat nix edit {{nixpkgs#pkg}}

Context

tldr-pages: common/nix edit

Revisions (0)

No revisions yet.