1
0
Fork 0
mirror of https://github.com/cachix/cachix-action.git synced 2025-06-09 09:35:10 +09:00
cachix-action/test.nix
sander ef8d8a4eb3
Bump test script nixpkgs (#181)
* test: bump test script nixpkgs

* test: use macos-13 as temp fix for missing arm installer
2024-04-25 19:42:16 +02:00

13 lines
458 B
Nix

# Realizes <num>> of derivations with size of <size>MB
{ size ? 1 # MB
, num ? 10 # count
, currentTime ? builtins.currentTime
}:
with (import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11") {});
let
drv = i: runCommand "${toString currentTime}-${toString i}" {} ''
dd if=/dev/zero of=$out bs=${toString size}MB count=1
'';
in lib.listToAttrs (builtins.map (i: lib.nameValuePair "drv${toString i}" (drv i)) (lib.range 1 num))