66fb56ba

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Discover cabal components at build time; drop sources arg from mutationCheck

The mutation Nix harness previously discovered executable and test-suite
component names at Nix evaluation time by regex-parsing the on-disk cabal
files reachable from a 'sources' list of source-tree roots passed to
'mutationCheck'. That required callers to enumerate every source root
that could contain a package, and could not see through hpack-generated
files unless they had been written to disk.

Add a tiny 'sydtest-cabal-components' helper executable that uses the
'Cabal' library to print the declared executable or test-suite component
names of a given cabal file. The mutation harness now runs that helper
inside the relevant derivations at build time:

  * 'addManifest.nix' parses the wrapped package's cabal file in
    postInstall to discover the executable names to install under
    '$out/bin'.
  * 'mutationCheck.nix's 'builtTestPkg' parses each test-package's
    cabal file in postInstall to discover and install test-suite exes
    under '$out/test'.
  * 'mutationCheck.nix' assembles the driver's YAML config inside
    'buildPhase' via 'jq', walking each test-package's installed test
    exes rather than enumerating suite names at evaluation time.

As a result, 'mutationCheck' no longer takes a 'sources' argument and
'cabalComponents.nix' is gone. The helper lives in 'sydtest-cabal-
components', excluded from the forward-compat 'sydtestReleaseWithoutMutation'
because the 'Cabal' API it uses moved on between GHC versions.
forwardCompatibilitymutation-manifest-examplemutation-opt-env-confmutation-safe-coloured-textmutation-sydtest-mutation-examplepre-commitreleaseshellconfiguredevShelldefaultx86_64-linux