This commit is contained in:
Amy de Buitléir 2025-09-15 16:09:56 +01:00
parent cc0b5f01b7
commit 987c2a5444

View file

@ -5250,7 +5250,7 @@ hello-flake
</div>
<div class="paragraph">
<p>Lines 5-8 and 15 were explained in <a href="#devshell-nix-non-flake">Section 10.4.5, &#8220;Access a non-flake package (not in nixpkgs)&#8221;</a>.
As expected, we need to add <code>helloNix</code> as a build input, which we do in line 40.
As expected, we need to add <code>hello-flake</code> as a build input, which we do in line 40.
That does make it available at build and runtime, but it doesn&#8217;t put it on the path,
so our <code>hello-again</code> script won&#8217;t be able to find it.</p>
</div>
@ -5283,9 +5283,6 @@ In that case, adding the dependency to <code>buildInputs</code> is sufficient.</
<div class="literalblock">
<div class="content">
<pre class="nowrap">$ nix run
this derivation will be built:
/nix/store/73n3x29aksn0dzr1fgqkwygrmdasrgcx-hello-again.drv
building '/nix/store/73n3x29aksn0dzr1fgqkwygrmdasrgcx-hello-again.drv'...
I'm a flake, and I'm running a command defined in a another flake.
Hello from your flake!</pre>
</div>
@ -5610,7 +5607,7 @@ Hello from your flake!</pre>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2025-09-15 16:06:57 IST
Last updated 2025-09-15 16:08:26 IST
</div>
</div>
</body>