Initial commit

This commit is contained in:
Domen Kožar 2019-09-29 21:52:02 +02:00 committed by Domen Kožar
commit 90e4945c77
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
14 changed files with 4306 additions and 0 deletions

15
test.nix Normal file
View file

@ -0,0 +1,15 @@
# Realizes <num>> of derivations with size of <size>MB
{ size ? 1 # MB
, num ? 10 # count
, currentTime ? builtins.currentTime
}:
with import <nixpkgs> {};
let
drv = i: runCommand "${toString currentTime}-${toString i}" {} ''
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)}
''