You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the correct way to use tasty-discover is to add it to a test-suites 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:
It seems that the correct way to use
tasty-discover
is to add it to atest-suite
sbuild-tool-depends
section, rather than justbuild-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 derivedshellFor
doesn't includetasty-discover
. Looking at the output ofcabal-to-nix
, we see:Note that
tasty-discover
is not independs
. But inshellFor
, we have:which only looks at
depends
.The text was updated successfully, but these errors were encountered: