1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00
This commit is contained in:
Valentin Gagarin 2023-08-24 18:27:54 +02:00 committed by GitHub
parent 458acd70b2
commit 73b928d5e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,7 +215,7 @@ If the Nix file containing this expression is in `/home/myuser/myproject`, then
The problem is that now your build is no longer reproducible, as it depends on the parent directory name.
That cannot declared in the source code, and results in an impurity.
If someone builds the project in a directory with a different name, they will get a different store path hash for `src` and everything that depends on it.
If someone builds the project in a directory with a different name, they will get a different store path for `src` and everything that depends on it.
:::{tip}
Use [`builtins.path`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-path) with the `name` attribute set to something fixed.