diff options
| author | Jan Tojnar <jtojnar@gmail.com> | 2023-11-19 18:24:30 +0100 |
|---|---|---|
| committer | Jan Tojnar <jtojnar@gmail.com> | 2023-11-19 18:45:00 +0100 |
| commit | 8ef5fcf4f5aa1a862a6787ea765e5bec8c5eb648 (patch) | |
| tree | ea39c5125b8f0371d070f9952f80e0300e4113ab /pkgs/development/python-modules/rangehttpserver | |
| parent | ff61f2bb3ff587df1a81c54f0f1b31bce46eec01 (diff) | |
upower: Simplify DESTDIR hack
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.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions
