nix/tests/functional/import-derivation.sh

17 lines
314 B
Bash
Raw Normal View History

#!/usr/bin/env bash
source common.sh
TODO_NixOS
clearStore
if nix-instantiate --readonly-mode ./import-derivation.nix; then
echo "read-only evaluation of an imported derivation unexpectedly failed"
exit 1
fi
outPath=$(nix-build ./import-derivation.nix --no-out-link)
[ "$(cat "$outPath")" = FOO579 ]