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; drv = haskellPackages.vector;
docs = pkgs.haskell.lib.documentationTarball drv; 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" tar xvzf "${docs}/${drv.name}-docs.tar.gz"
# Check for Haddock html # Check for Haddock html

View file

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

View file

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

View file

@ -14,7 +14,11 @@ let
; ;
in 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-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"}
${writeTest "success" "test-haskell-simple-writer" simple.haskell} ${writeTest "success" "test-haskell-simple-writer" simple.haskell}
${writeTest "success" "test-haskell-path-writer" path.haskell} ${writeTest "success" "test-haskell-path-writer" path.haskell}