diff --git a/test.nix b/test.nix index 4f6ba38..998affd 100644 --- a/test.nix +++ b/test.nix @@ -1,18 +1,18 @@ # Realizes > of derivations with size of MB -{ size ? 1 # MB -, num ? 10 # count -, currentTime ? builtins.currentTime -, noChroot ? false +{ + size ? 1, # MB + num ? 10, # count + currentTime ? builtins.currentTime, + noChroot ? false, }: - -with import {}; - -let - drv = i: runCommand "${toString currentTime}-${toString i}" { - __noChroot = noChroot; - } '' - dd if=/dev/zero of=$out bs=${toString size}MB count=1 - ''; -in writeText "empty-${toString num}-${toString size}MB" '' - ${lib.concatMapStringsSep "" drv (lib.range 1 num)} -'' +with import {}; let + drv = i: + runCommand "${toString currentTime}-${toString i}" { + __noChroot = noChroot; + } '' + dd if=/dev/zero of=$out bs=${toString size}MB count=1 + ''; +in + writeText "empty-${toString num}-${toString size}MB" '' + ${lib.concatMapStringsSep "" drv (lib.range 1 num)} + ''