Closed
Description
It seems that the correct way to use tasty-discover
is to add it to a test-suite
s build-tool-depends
section, rather than just build-depends
. build-tool-depends
guarantees that it's on $PATH
at build time, which is needed for it to work as it's a GHC preprocessor. However, if we do this then it correctly builds as a component, but the derived shellFor
doesn't include tasty-discover
. Looking at the output of cabal-to-nix
, we see:
tests = {
"tests" = {
depends = [
...
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hedgehog" or (errorHandler.buildDepError "tasty-hedgehog"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
];
build-tools = [
(hsPkgs.buildPackages.tasty-discover or (pkgs.buildPackages.tasty-discover or (errorHandler.buildToolDepError "tasty-discover")))
];
buildable = true;
};
};
Note that tasty-discover
is not in depends
. But in shellFor
, we have:
packageInputs = removeSelectedPackages (lib.concatMap (cfg: cfg.depends) selectedConfigs) ++ additionalPackages;
which only looks at depends
.
Metadata
Metadata
Assignees
Labels
No labels