2024-05-28 12:43:04 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2012-01-26 08:04:50 -05:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 11:56:50 -04:00
|
|
|
clearStoreIfPossible
|
2012-01-26 08:04:50 -05:00
|
|
|
|
2024-09-17 10:55:44 -04:00
|
|
|
if nix-instantiate --readonly-mode ./import-from-derivation.nix; then
|
2012-01-26 08:04:50 -05:00
|
|
|
echo "read-only evaluation of an imported derivation unexpectedly failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-09-17 10:55:44 -04:00
|
|
|
outPath=$(nix-build ./import-from-derivation.nix --no-out-link)
|
2012-01-26 08:04:50 -05:00
|
|
|
|
2024-06-04 16:33:59 -04:00
|
|
|
[ "$(cat "$outPath")" = FOO579 ]
|