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 {
type = with lib.types; attrsOf (submodule partitionOptions);
default = { };
@ -178,9 +185,9 @@ in
in
pkgs.runCommand cfg.name
{
nativeBuildInputs = with pkgs; [
fakeroot
systemd
nativeBuildInputs = [
cfg.package
pkgs.fakeroot
] ++ fileSystemTools;
} ''
amendedRepartDefinitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory})