update nix.md
This commit is contained in:
parent
a44fc08a84
commit
4114d2bad5
1 changed files with 8 additions and 4 deletions
12
nix.md
12
nix.md
|
@ -156,10 +156,13 @@ derivation {
|
|||
system = builtins.currentSystem;
|
||||
}
|
||||
```
|
||||
<div class="eval">= derivation «/nix/store/ha5hof1nput-foobar.drv»</div>
|
||||
<div class="eval">= derivation «/nix/store/119h84n7a58069l5zi0rgs7q06rhrlh3-foobar.drv»</div>
|
||||
|
||||
To build this, use `:b (copy-pasted code)` in the repl. It should print
|
||||
a path to the build outputs.
|
||||
This code outputs a hash-based path to a derivation, nix's version of a
|
||||
build script. Derivations *derive* build outputs from build inputs. To
|
||||
build the derivation, use `:b (copy-pasted code)` in the repl. It should
|
||||
print a path to the build outputs. If you `cat` the output, you should
|
||||
get back "Hello, derivation!".
|
||||
|
||||
[NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) is a combination package
|
||||
repository and standard library, containing thousands of derivations and
|
||||
|
@ -190,7 +193,8 @@ Here's an example flake:
|
|||
description = "any useful description here";
|
||||
|
||||
inputs = {
|
||||
# this is a flake identifier
|
||||
# Inputs take in flake references
|
||||
# https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#flake-references
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue