mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-10 07:42:35 +08:00
temp
This commit is contained in:
parent
bce2616a56
commit
83b2dae572
2 changed files with 20 additions and 5 deletions
23
index.html
23
index.html
|
|
@ -5287,15 +5287,30 @@ so our <code>hello-again</code> script won’t be able to find it.</p>
|
|||
In this case we simply edited the script as we install it,
|
||||
by specifying the full path to <code>hello-nix</code>.</p>
|
||||
</div>
|
||||
<div class="admonitionblock note">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<i class="fa icon-note" title="Note"></i>
|
||||
</td>
|
||||
<td class="content">
|
||||
<div class="paragraph">
|
||||
<p>When you’re packaging a program written in a more powerful language such as
|
||||
Haskell, Python, Java, C, C#, or Rust,
|
||||
the language build system will usually do all that is required
|
||||
to make the dependencies visible to the program at runtime.
|
||||
In that case, adding the dependency to <code>buildInputs</code> is sufficient.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Here’s a demonstration using the shell.</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre class="nowrap">$ nix run
|
||||
this derivation will be built:
|
||||
/nix/store/xdld3mcyya6vzr5v7ihg1wqgq4daj2y6-hello-again.drv
|
||||
building '/nix/store/xdld3mcyya6vzr5v7ihg1wqgq4daj2y6-hello-again.drv'...
|
||||
I'm a flake, but I'm running a command defined in a non-flake package.
|
||||
Hello from your nix package!</pre>
|
||||
</div>
|
||||
|
|
@ -5361,7 +5376,7 @@ Hello from your flake!</pre>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2025-09-15 15:13:34 IST
|
||||
Last updated 2025-09-15 15:16:48 IST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ to make the dependencies visible to the program at runtime.
|
|||
In that case, adding the dependency to `buildInputs` is sufficient.
|
||||
====
|
||||
|
||||
Here's a demonstration using the shell.
|
||||
Here's a demonstration using the flake.
|
||||
|
||||
....
|
||||
$ nix run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue