--- 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> ```