User:Researchcrowbar: Difference between revisions

From NixOS Wiki
imported>Researchcrowbar
start
 
imported>Researchcrowbar
add nix-shell --packages examples
 
Line 1: Line 1:
{{Note|This page is used for format<ref>https://www.mediawiki.org/wiki/Help:Cite</ref> experiments.}}  
{{Note|This page is used for format<ref>https://www.mediawiki.org/wiki/Help:Cite</ref> experiments and quick notes.}}  


==Notes==
==Notes==
<references />
<references />
Note that -p accepts multiple full nix expressions that are valid in the buildInputs = [ ... ] shown above, not only package names. So the following is also legal:
<syntaxhighlight lang="console">nix-shell --packages sqlite 'git.override { withManual = false; }'</syntaxhighlight>
On that note, it is also possible to bring a flake result into nix-shell with a bit of manual plumbing:
<syntaxhighlight lang="console">nix-shell --packages '(builtins.getFlake "github:lf-/clipper").packages.${builtins.currentSystem}.default' tshark</syntaxhighlight>

Latest revision as of 14:48, 1 February 2024

Note: This page is used for format[1] experiments and quick notes.

Notes

Note that -p accepts multiple full nix expressions that are valid in the buildInputs = [ ... ] shown above, not only package names. So the following is also legal:

nix-shell --packages sqlite 'git.override { withManual = false; }'

On that note, it is also possible to bring a flake result into nix-shell with a bit of manual plumbing:

nix-shell --packages '(builtins.getFlake "github:lf-/clipper").packages.${builtins.currentSystem}.default' tshark