Files
Hamish Mackenzie 89f50a96dd Use pkgs.lib instead of stdenv.lib (#1031)
Fixes:

Warning: `stdenv.lib` is deprecated and will be removed in the next release. Please use `pkgs.lib` instead. For more information see https://github.com/NixOS/nixpkgs/issues/108938
2021-02-11 01:07:16 +13:00

24 lines
624 B
Nix

{ stdenv, lib, writeScript }:
with lib;
writeScript "check-materialization-concurrency.sh" ''
#!${stdenv.shell}
set -euo pipefail
WORK=$(mktemp -d)
# We expect to see both the hello and world derivations to start building
# before either of them finish.
echo EVENT start hello > $WORK/expected.txt
echo EVENT start world >> $WORK/expected.txt
echo EVENT end hello >> $WORK/expected.txt
echo EVENT end world >> $WORK/expected.txt
nix-build -j2 scripts/check-materialization-concurrency --arg n "\"$(date)\"" 2>&1 | grep '^EVENT' > $WORK/actual.txt
diff -u $WORK/expected.txt $WORK/actual.txt
''