Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(hare): check for propagatedBuildInputs on HAREPATH #327

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/extra/language.hare.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ pkgs.lib.optionalAttrs (!pkgs.hostPlatform.isDarwin) {
type -p hare
'';
# Test good HAREPATH value
# TODO: When the nixpkgs input is updated, change hare-ev to hare-png, so
# that the inclusion of propagatedBuildInputs third-party libraries is also tested.
language-hare-2 =
let
shell = devshell.mkShell {
imports = [ ../../extra/language/hare.nix ];
devshell.name = "devshell-2";
language.hare = {
thirdPartyLibs = [ pkgs.hareThirdParty.hare-compress ];
thirdPartyLibs = [ pkgs.hareThirdParty.hare-png ];
vendoredLibs = [ "./vendor/lib" ];
};
};
Expand All @@ -49,10 +47,14 @@ pkgs.lib.optionalAttrs (!pkgs.hostPlatform.isDarwin) {
# Check for the stdlib being included in HAREPATH
[[ "$HAREPATH" =~ "src/hare/stdlib" ]] || die 'HAREPATH lacks `stdlib`'

# Check for hare-ev being included in HAREPATH
# Check for hare-compress being included in HAREPATH (propagatedBuildInputs of hare-png)
[[ "$HAREPATH" =~ /nix/store/[a-z0-9]{32}-hare-compress-.*/src/hare/third-party ]] \
|| die 'HAREPATH lacks `hare-compress`'

# Check for hare-png being included in HAREPATH
[[ "$HAREPATH" =~ /nix/store/[a-z0-9]{32}-hare-png-.*/src/hare/third-party ]] \
|| die 'HAREPATH lacks `hare-png`'

# Check for ./vendor/lib being included in HAREPATH
[[ "$HAREPATH" =~ $PWD/vendor/lib ]] || die "HAREPATH lacks \`$PWD/vendor/lib\`"
'';
Expand Down
Loading