diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-11-23 20:42:14 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-01-18 03:54:22 +0100 |
commit | 4529ed12590d7f814e40223437c7df4fea492e2d (patch) | |
tree | 82ff5794c928d58fa28e9b4c0731d8c44628a7e8 /pkgs/build-support/buildenv/default.nix | |
parent | 85dd89f6eb02aacdde2932652c628b06f8e562da (diff) | |
download | nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar.gz nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar.bz2 nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar.lz nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar.xz nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.tar.zst nixlib-4529ed12590d7f814e40223437c7df4fea492e2d.zip |
buildEnv: Check the content of colliding paths.
Originally wanted to include ignoreCollisions in cups-progs, but I think it's better if we use ignoreCollisions only if there are _real_ collisions between files with different contents. Of course, we also check whether the file permissions match, so you get a collision if contents are the same but the permissions are different. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/build-support/buildenv/default.nix')
-rw-r--r-- | pkgs/build-support/buildenv/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index 9b8b9daad94d..a9a4d95d7d8f 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -16,6 +16,10 @@ , # Whether to ignore collisions or abort. ignoreCollisions ? false +, # If there is a collision, check whether the contents and permissions match + # and only if not, throw a collision error. + checkCollisionContents ? true + , # The paths (relative to each element of `paths') that we want to # symlink (e.g., ["/bin"]). Any file not inside any of the # directories in the list is not symlinked. @@ -39,7 +43,9 @@ }: runCommand name - rec { inherit manifest ignoreCollisions passthru meta pathsToLink extraPrefix postBuild buildInputs; + rec { + inherit manifest ignoreCollisions checkCollisionContents passthru + meta pathsToLink extraPrefix postBuild buildInputs; pkgs = builtins.toJSON (map (drv: { paths = [ drv ] |