24 lines
1012 B
Markdown
24 lines
1012 B
Markdown
---
|
|||
|
|
name: nix-shell-tooling
|
||
|
|
description: "Any nixpkgs tool can be run ad hoc via nix run / nix shell — a missing command is never a dead end during development"
|
||
|
|
metadata:
|
||
|
|
node_type: memory
|
||
|
|
type: feedback
|
||
|
|
originSessionId: dfb56b58-518b-4daf-b531-7119bb4a9534
|
||
|
|
---
|
||
|
|
|
||
|
|
Any tool in nixpkgs can be run without installing it into the environment. If a
|
||
|
|
command is missing during development, pull it from nixpkgs on the fly instead
|
||
|
|
of working around its absence or reporting the tool as unavailable.
|
||
|
|
|
||
|
|
**Why:** Lyra runs NixOS; the ambient PATH is deliberately minimal, but the full
|
||
|
|
nixpkgs set is always one command away. "command not found" is not a blocker.
|
||
|
|
|
||
|
|
**How to apply:**
|
||
|
|
|
||
|
|
- One-off run: `nix run nixpkgs#<pkg> -- <args>` (e.g. `nix run nixpkgs#jq -- .`).
|
||
|
|
- Tools on PATH for a session: `nix shell nixpkgs#<pkg> [nixpkgs#<pkg2> ...]`,
|
||
|
|
then run commands normally.
|
||
|
|
- Legacy form also works: `nix-shell -p <pkg> --run '<cmd>'`.
|
||
|
|
- Prefer this over hand-rolling a substitute for a tool that exists in nixpkgs.
|