Skip to content

Commit

Permalink
test(hare): check for propagatedBuildInputs on HAREPATH (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
onemoresuza authored Dec 31, 2024
1 parent 969df24 commit cc004e8
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit cc004e8

Please sign in to comment.