tests.haskell: set meta.platforms

This allows packagePlatforms to pick up on the overall supported
platforms and schedule builds on Hydra for more than the evaluation
platform (usually x86_64-linux).
This commit is contained in:
sternenseemann 2021-07-13 15:37:22 +02:00
parent 6bd0c16f89
commit 3e19234f34
4 changed files with 20 additions and 4 deletions

View File

@ -4,7 +4,11 @@ let
drv = haskellPackages.vector;
docs = pkgs.haskell.lib.documentationTarball drv;
in pkgs.runCommand "test haskell.lib.documentationTarball" { } ''
in pkgs.runCommand "test haskell.lib.documentationTarball" {
meta = {
inherit (docs.meta) platforms;
};
} ''
tar xvzf "${docs}/${drv.name}-docs.tar.gz"
# Check for Haddock html

View File

@ -30,7 +30,12 @@ let
fi
'';
in pkgs.runCommand "test haskell.lib.setBuildTarget" {} ''
in
pkgs.runCommand "test haskell.lib.setBuildTarget" {
meta = {
inherit (drv.meta) platforms;
};
} ''
${test "foo" "bar"}
${test "bar" "foo"}
touch "$out"

View File

@ -29,5 +29,8 @@
additionalMaintainers = with lib.maintainers; [ cdepillabout ];
allMaintainers = oldMaintainers ++ additionalMaintainers;
in
oldMeta // { maintainers = allMaintainers; };
oldMeta // {
maintainers = allMaintainers;
inherit (cabal-install.meta) platforms;
};
})

View File

@ -14,7 +14,11 @@ let
;
in
runCommand "test-haskell-writers" {} ''
runCommand "test-haskell-writers" {
meta = {
inherit (tests.writers.meta) platforms;
};
} ''
${writeTest "success" "test-haskell-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"}
${writeTest "success" "test-haskell-simple-writer" simple.haskell}
${writeTest "success" "test-haskell-path-writer" path.haskell}