mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
89f50a96dd
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
24 lines
624 B
Nix
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
|
|
''
|
|
|