mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
9d2ed0a7d3
This should make `_NIX_TEST_ACCEPT=1` work again, fixing #11369. Progress on #2503
30 lines
668 B
Bash
Executable file
30 lines
668 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source common.sh
|
|
|
|
TODO_NixOS
|
|
|
|
clearStore
|
|
|
|
path=$(nix-build dependencies.nix --no-out-link)
|
|
|
|
# Test nix-store -l.
|
|
[ "$(nix-store -l $path)" = FOO ]
|
|
|
|
# Test compressed logs.
|
|
clearStore
|
|
rm -rf $NIX_LOG_DIR
|
|
(! nix-store -l $path)
|
|
nix-build dependencies.nix --no-out-link --compress-build-log
|
|
[ "$(nix-store -l $path)" = FOO ]
|
|
|
|
# test whether empty logs work fine with `nix log`.
|
|
builder="$(realpath "$(mktemp)")"
|
|
echo -e "#!/bin/sh\nmkdir \$out" > "$builder"
|
|
outp="$(nix-build -E \
|
|
'with import '"${config_nix}"'; mkDerivation { name = "fnord"; builder = '"$builder"'; }' \
|
|
--out-link "$(mktemp -d)/result")"
|
|
|
|
test -d "$outp"
|
|
|
|
nix log "$outp"
|