diff options
author | Alexey Shmalko <rasen.dubi@gmail.com> | 2016-07-09 23:47:15 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-07-13 03:54:11 +0300 |
commit | 0172558e8278eda2f08f9fc02ff831538548ced3 (patch) | |
tree | b2b4fad03a987b3f9b74a94071c40fb46ebc3fd8 /nixos/modules/system | |
parent | f56a319e3ef1518274026d3350dfdca956a7ac1e (diff) | |
download | nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar.gz nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar.bz2 nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar.lz nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar.xz nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.tar.zst nixlib-0172558e8278eda2f08f9fc02ff831538548ced3.zip |
buildEnv: build the whole tree of directories to pathsToLink
This patch fixes #16614 and #16741. The first issue was caused by the fact that both `/share` and `/share/fish/vendor_completions.d` end in the `pathsToLink`. The `pkgs/build-support/buildenv/builder.pl` creates `/share`, then links `/share/fish` under `/share` and then tries to create the directory `/share/fish/vendor_completions.d` and fails because it already exists. The simplest way to reproduce the issue is to build the next Nix expression: ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.fish pkgs.vim ]; pathsToLink = [ "/share" "/share/fish/vendor_completions.d" ]; } ``` The second issue is more critical and was caused by the fact findFiles doesn't recurse deep enough. It stops at first unique directory for the package (e.g., "/share" or even "/") and later the scripts decides it shouldn't link it as it doesn't match pathsToLink (e.g., "/share/fish"), so the result is empty. The test: ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.fish pkgs.vim ]; pathsToLink = [ "/share/fish/functions" ]; } ``` or ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.vim ]; pathsToLink = [ "/share" ]; } ```
Diffstat (limited to 'nixos/modules/system')
0 files changed, 0 insertions, 0 deletions