Add asciinema support
This commit is contained in:
parent
981b8ad067
commit
866fe408e4
9 changed files with 2930 additions and 12 deletions
22
content/posts/nix-evaluation-blocking/a.nix
Normal file
22
content/posts/nix-evaluation-blocking/a.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> { };
|
||||
wait = n: builtins.readFile (pkgs.runCommand "delay" { } ''
|
||||
sleep ${toString n}
|
||||
|
||||
echo $((${toString n} * 5)) > $out
|
||||
'');
|
||||
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "blah";
|
||||
dontUnpack = true;
|
||||
doInstall = false;
|
||||
dontConfigure = true;
|
||||
buildPhase = ''
|
||||
echo ${wait 1}
|
||||
echo ${wait 2}
|
||||
echo ${wait 3}
|
||||
touch $out
|
||||
'';
|
||||
doBuild = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue