mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
8ef5fcf4f5
Let’s point `DESTDIR` to a path under the build directory rather than under "$out". This will prevent `installPhase` from creating `$out` or any other output directory, allowing us to install the outputs just by moving them out of `$DESTDIR` directly into the store with `mv`. Of course, that will also require moving the installing of `etc` and `var` after the outputs are installed and ensuring there is no library litter from `checkPhase`. Since `$out` does not currently contain `var` subdirectory, we can also just move `$DESTDIR/var` directly to `$out` rather than copying it. `$out/etc` does exist but we can just merge it with `cp --recursive` instead of `rsync` so `rsync` is not actually necessary. The code remains written defensively against files accidentally being misplaced while shuffling them around – parent directories of targets are used as `mv` destinations so that the move fails loudly if the directory already exists, rather than being moved inside as e.g. `$out/etc/etc`. While at it let’s also improve practices a bit: - Add vertical space and clearer comments. - Handle non-standard Nix store paths. |
||
---|---|---|
.. | ||
default.nix | ||
i686-test-remove-battery-check.patch | ||
installed-tests-path.patch |