Nix Cookbook: Difference between revisions
→Vulnerabilities: Add an actual link to vulnix |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 184: | Line 184: | ||
Let's dissect this: | Let's dissect this: | ||
< | <syntaxhighlight lang="sh" line="1"> | ||
## instantiate bochs into `.drv` files and print the filenames; | ## instantiate bochs into `.drv` files and print the filenames; | ||
instantiate=$(nix-instantiate '<nixpkgs>' -A bochs) | instantiate=$(nix-instantiate '<nixpkgs>' -A bochs) | ||
## print all references/requirements, filtering the .drv files (which is where static derivations live) | ## print all references/requirements, filtering the .drv files (which is where static derivations live) | ||
requirements=$(nix-store -qR $ | requirements=$(nix-store -qR $instantiate | grep '.drv$') | ||
## keep only the source derivations, since those will have a predefined hash of the output | ## keep only the source derivations, since those will have a predefined hash of the output | ||
| Line 196: | Line 196: | ||
## realize those derivations, downloading all sources and storing them in the nix store | ## realize those derivations, downloading all sources and storing them in the nix store | ||
nix-store -r $sources | nix-store -r $sources | ||
</ | </syntaxhighlight> | ||
After that, all sources will be locally stored! | After that, all sources will be locally stored! | ||
Source: | Source: [https://web.archive.org/web/20160829181620/http://lists.science.uu.nl/pipermail/nix-dev/2013-January/010438.html nix-dev thread] | ||
== Wrapping packages == | == Wrapping packages == | ||
| Line 388: | Line 388: | ||
=== Vulnerabilities === | === Vulnerabilities === | ||
See | See [https://github.com/nix-community/vulnix vulnix]. | ||
[[Category:nix]] | [[Category:nix]] | ||
[[Category:Cookbook]] | [[Category:Cookbook]] | ||