diff --git a/lib/image-builder/makeFAT32.nix b/lib/image-builder/makeFAT32.nix index 4687cd46..4081ca3c 100644 --- a/lib/image-builder/makeFAT32.nix +++ b/lib/image-builder/makeFAT32.nix @@ -1,4 +1,4 @@ -{ makeFilesystem, dosfstools, mtools, libfaketime }: +{ makeFilesystem, dosfstools, mtools, libfaketime, size }: /* */ let scope = { "fileSystem.makeFAT32" = @@ -7,6 +7,8 @@ makeFilesystem (args // { # FAT32 can be used for ESP. Let's make this obvious. filesystemType = if args ? filesystemType then args.filesystemType else "FAT32"; + minimumSize = size.KiB 500; + nativeBuildInputs = [ libfaketime dosfstools diff --git a/lib/image-builder/makeFilesystem.nix b/lib/image-builder/makeFilesystem.nix index c781f0fc..5f296286 100644 --- a/lib/image-builder/makeFilesystem.nix +++ b/lib/image-builder/makeFilesystem.nix @@ -1,10 +1,9 @@ -{ stdenvNoCC, lib, writeText, size }: +{ stdenvNoCC, lib, writeText }: /* */ let scope = { "fileSystem.makeFilesystem" = let inherit (lib) optionals optionalString assertMsg; - minimumSize = toString (size.KiB 500); in { @@ -58,9 +57,9 @@ stdenvNoCC.mkDerivation (args // rec { size=$(cd files; du -sb --apparent-size . | tr -cd '[:digit:]') ''} - if (( size < ${minimumSize} )); then - size=${minimumSize} - echo "WARNING: partition was too small, size increased to ${minimumSize} bytes." + if (( size < minimumSize )); then + size=$minimumSize + echo "WARNING: partition was too small, size increased to $minimumSize bytes." fi echo