mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
* New primop builtins.filterSource, which can be used to filter files
from a source directory. All files for which a predicate function returns true are copied to the store. Typical example is to leave out the .svn directory: stdenv.mkDerivation { ... src = builtins.filterSource (path: baseNameOf (toString path) != ".svn") ./source-dir; # as opposed to # src = ./source-dir; } This is important because the .svn directory influences the hash in a rather unpredictable and variable way.
This commit is contained in:
parent
b438d37558
commit
a3e6415ba8
19 changed files with 143 additions and 68 deletions
|
@ -949,7 +949,7 @@ void DerivationGoal::buildDone()
|
|||
as that means that someone else can have interfered
|
||||
with the build. Also, the output should be owned by
|
||||
the build user. */
|
||||
if ((st.st_mode & (S_IWGRP | S_IWOTH)) ||
|
||||
if ((!S_ISLNK(st.st_mode) && (st.st_mode & (S_IWGRP | S_IWOTH))) ||
|
||||
(buildUser.enabled() && st.st_uid != buildUser.getUID()))
|
||||
throw BuildError(format("suspicious ownership or permission on `%1%'; rejecting this build output") % path);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue