Caching nix shell build inputs: Difference between revisions

imported>Ericson2314
m Make the shell.nix example ideomatically respect the buildInputs nativeBuildInputs distinction
Klinger (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 27: Line 27:
== How can we cache all buildInputs for mkShell? ==
== How can we cache all buildInputs for mkShell? ==


A [https://fzakaria.com/2020/08/11/caching-your-nix-shell.html blog post] on the subject improved upon the previous wisdom and came up with the following
A [https://fzakaria.com/2020/08/11/caching-your-nix-shell.html blog post] ([https://web.archive.org/web/20201012134126/https://fzakaria.com/2020/08/11/caching-your-nix-shell.html mirror]) on the subject improved upon the previous wisdom and came up with the following


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 53: Line 53:
nix-build shell.nix -A inputDerivation | cachix push $name
nix-build shell.nix -A inputDerivation | cachix push $name
</syntaxhighlight>
</syntaxhighlight>
[[Category:nix]]