mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 20:44:12 +00:00
![]() As a follow-up to https://github.com/NixOS/nixpkgs/pull/294096 this should further improve the flexibility around building OS images with systemd-repart: * Previously the attribute set `compression` needed to be fully populated, including `algorithm` and `level` because `compression.enable` was evaluated by bash, after being interpolated as strings into the `buildCommand`. Now it's sufficient to pass `compression.enable = false` to the builder, e.g. in `overrideAttrs`, to disable the compression. * Using mkDerivation allows for much more customization than the previously used `runCommand`, making use of phases and pre/post hooks. This is especially helpful for building multiple images from the same system configuration, e.g. to build an image `Y` based on a partially built raw image `X`, by injecting a UKI that depends on `X` into a defered ESP. * Before this change it was non-trivial to conduct further manipulations on the amended repart definitions. Now, the definitions that systemd-repart uses to build the image can be easily manipulated in `postPatch` or `preBuild`. Aside from this, the build is now executed in the build directory, rather than `$out`. This allows references to relative paths in the build environment to be used, especially for `--definitions`, which previously required an absolute path. |
||
---|---|---|
.. | ||
amend-repart-definitions.py | ||
repart-image.nix | ||
repart.nix |