Merge pull request #4 from cachix/list-of-drvs

fix for #3
This commit is contained in:
Domen Kožar 2019-10-03 15:52:29 +02:00 committed by GitHub
commit 7fe7f51850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -37,12 +37,12 @@ async function run() {
},
}
};
const args = prependEach('-A', nonEmptySplit(attributes, /\s/)).concat([file || "default.nix"]);
const args = prependEach('-A', nonEmptySplit(attributes, /\s+/)).concat([file || "default.nix"]);
await exec.exec('nix-build', args, options);
core.endGroup()
core.startGroup(`Cachix: pushing to ` + name);
await exec.exec('cachix', ['push', name].concat(nonEmptySplit(paths, /\s/).join(' ')));
await exec.exec('cachix', ['push', name].concat(nonEmptySplit(paths, /\s+/)));
core.endGroup()
} catch (error) {
core.setFailed(`Action failed with error: ${error}`);

View file

@ -10,6 +10,4 @@ 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)}
''
in lib.listToAttrs (builtins.map (i: lib.nameValuePair "drv${toString i}" (drv i)) (lib.range 1 num))