diff options
author | Jasper Ras <jaspert.ras@gmail.com> | 2025-04-26 13:13:58 +0200 |
---|---|---|
committer | Jasper Ras <jaspert.ras@gmail.com> | 2025-04-26 13:13:58 +0200 |
commit | f0a7d563a385663513f24aecad92219ecfc83bd8 (patch) | |
tree | d3b201241bd8934a63646d26a94c9b2730775ca0 /A nice way to test flake output.md | |
parent | 80325cced8485df9d87c1b5d9f5d123d85b01336 (diff) |
vault backup: 2025-04-26 13:13:58
Diffstat (limited to 'A nice way to test flake output.md')
-rw-r--r-- | A nice way to test flake output.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/A nice way to test flake output.md b/A nice way to test flake output.md new file mode 100644 index 0000000..cddf712 --- /dev/null +++ b/A nice way to test flake output.md @@ -0,0 +1,37 @@ +--- +tags: + - nix +--- +Flakes are described in [[Basic building blocks of Nix]]. + +A way to test flake outputs is by loading the flake in nix-repl and then using `:b` which builds a derivation. I learnt about `:b` from [this Nix Pill](https://nixos.org/guides/nix-pills/06-our-first-derivation.html). + +``` +box main 7s +❯ nix repl +Nix 2.24.14 +Type :? for help. +nix-repl> :lf . +Added 13 variables. + +nix-repl> outputs.packages.x86_64-linux.default +«derivation /nix/store/g8y3gdd2rr2j5awx8p75ih0k072571yr-box.drv» + +nix-repl> :b outputs.packages.x86_64-linux.default +error: builder for '/nix/store/g8y3gdd2rr2j5awx8p75ih0k072571yr-box.drv' failed with exit code 1; + last 9 log lines: + > Running phase: unpackPhase + > unpacking source archive /nix/store/gli7ljgsva1wchy3h4n2lmvs1rfssl40-source + > source root is source + > Running phase: patchPhase + > Running phase: updateAutotoolsGnuConfigScriptsPhase + > Running phase: configurePhase + > no configure script, doing nothing + > Running phase: buildPhase + > failed to initialize build cache at /homeless-shelter/.cache/go-build: mkdir /homeless-shelter: permission denied + For full logs, run 'nix log /nix/store/g8y3gdd2rr2j5awx8p75ih0k072571yr-box.drv'. +[0 built (1 failed)] +nix-repl> + +``` + |