mirror of
https://github.com/nix-dot-dev/nix.dev.git
synced 2024-08-17 17:20:44 +03:00
Update source/tutorials/file-sets.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
parent
9ecfd01a0d
commit
fb3fb0c060
@ -6,12 +6,8 @@ Also use https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-filese
|
||||
instead of https://nixos.org/manual/nixpkgs/unstable/#sec-fileset
|
||||
-->
|
||||
|
||||
To build a local project in a Nix derivation,
|
||||
its source files must be accessible
|
||||
to the [derivation builder](https://nixos.org/manual/nix/stable/language/derivations#attr-builder).
|
||||
Since by default, derivations get built in an [isolated environment](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox)
|
||||
that only allows reading from the Nix store,
|
||||
the Nix language has built-in features to copy local files to the store and expose the resulting store paths.
|
||||
To build a local project in a Nix derivation, source files must be accessible to its [`builder` executable](https://nixos.org/manual/nix/stable/language/derivations#attr-builder).
|
||||
Since by default, the `builder` runs in an [isolated environment](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox) that only allows reading from the Nix store, the Nix language has built-in features to copy local files to the store and expose the resulting store paths.
|
||||
|
||||
Using these features directly can be tricky however:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user