mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-24 23:47:12 +08:00
temp
This commit is contained in:
parent
c439093734
commit
bce2616a56
2 changed files with 15 additions and 6 deletions
12
index.html
12
index.html
|
|
@ -5292,11 +5292,11 @@ by specifying the full path to <code>hello-nix</code>.</p>
|
|||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre class="nowrap">$ hello-nix # this will fail
|
||||
bash: line 40: hello-nix: command not found
|
||||
$ nix develop
|
||||
building '/nix/store/72z63qhsk4f8shg0yn81m76w56m42x7s-hello-again-env.drv'...
|
||||
$ hello-nix
|
||||
<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>
|
||||
</div>
|
||||
|
|
@ -5361,7 +5361,7 @@ Hello from your flake!</pre>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2025-09-15 15:11:30 IST
|
||||
Last updated 2025-09-15 15:13:34 IST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@ There are various ways to deal with this problem.
|
|||
In this case we simply edited the script as we install it,
|
||||
by specifying the full path to `hello-nix`.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
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 `buildInputs` is sufficient.
|
||||
====
|
||||
|
||||
Here's a demonstration using the shell.
|
||||
|
||||
....
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue