Created
March 21, 2018 17:39
-
-
Save coreyoconnor/e0673ac1e723a0d6211374b2ff02a5d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with (import <nixpkgs> {}); | |
with lib; | |
let | |
forceRebuild = "1"; | |
dummy = index: stdenv.mkDerivation { | |
name = "dummy-${forceRebuild}-${toString index}"; | |
builder = writeScript "sleeping-builder" '' | |
#!/bin/sh | |
echo "dummy ${toString index} is building" > $out | |
${coreutils}/bin/sleep 10 | |
''; | |
}; | |
indices = genList id 1000; | |
dummyDerivations = map (index: "dummy-${toString index} : ${dummy index}") indices; | |
in writeTextFile { | |
name = "toplevel"; | |
text = '' | |
${builtins.concatStringsSep "\n" dummyDerivations} | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment