mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-12 18:53:57 +08:00
temp
This commit is contained in:
parent
781aa484a1
commit
3116896558
1 changed files with 15 additions and 4 deletions
19
index.html
19
index.html
|
|
@ -5268,6 +5268,20 @@ so our <code>hello-again</code> script won’t be able to find it.</p>
|
|||
In this case we simply edited the script (lines 30-32) as we install it,
|
||||
by specifying the full path to <code>hello-nix</code>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Let’s take a closer look at the <code>buildInputs</code> expression from line 35.</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre class="nowrap">hello-flake.packages.${system}.hello</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Why is the first part <code>hello-flake</code> and the last part <code>hello</code>?
|
||||
The first part refers to the name we assigned in the input section of our flake,
|
||||
and the last part is the name of the package or app we want.
|
||||
(See <a href="#_flake_outputs">Section 3.1, “Flake outputs”</a> for how to identify flake outputs.)</p>
|
||||
</div>
|
||||
<div class="admonitionblock note">
|
||||
<table>
|
||||
<tr>
|
||||
|
|
@ -5292,9 +5306,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/aymycx9z7b8qgi0avs73b8c5xc4jxwx3-hello-again.drv
|
||||
building '/nix/store/aymycx9z7b8qgi0avs73b8c5xc4jxwx3-hello-again.drv'...
|
||||
I'm a flake, and I'm running a command defined in a another flake.
|
||||
Hello from your flake!</pre>
|
||||
</div>
|
||||
|
|
@ -5619,7 +5630,7 @@ Hello from your flake!</pre>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2025-09-15 17:34:09 IST
|
||||
Last updated 2025-09-15 17:37:10 IST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue