Merge pull request #247102 from yaxitech/image-repart-package-option

This commit is contained in:
Ryan Lahfa 2023-08-10 11:55:01 +02:00 committed by GitHub
commit afa8d16f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,6 +88,13 @@ in
''; '';
}; };
package = lib.mkPackageOption pkgs "systemd-repart" {
default = "systemd";
example = lib.literalExpression ''
pkgs.systemdMinimal.override { withCryptsetup = true; }
'';
};
partitions = lib.mkOption { partitions = lib.mkOption {
type = with lib.types; attrsOf (submodule partitionOptions); type = with lib.types; attrsOf (submodule partitionOptions);
default = { }; default = { };
@ -178,9 +185,9 @@ in
in in
pkgs.runCommand cfg.name pkgs.runCommand cfg.name
{ {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = [
fakeroot cfg.package
systemd pkgs.fakeroot
] ++ fileSystemTools; ] ++ fileSystemTools;
} '' } ''
amendedRepartDefinitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory}) amendedRepartDefinitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory})