v2 check: reproduce the cabal v2-test environment for test checks
builderVersion = 2 runs a test's installed binary directly (not via `cabal v2-test`) in an empty dir with only runtime libs on PATH, so tests that rely on the environment cabal normally provides failed. Bring the v2 `check` (lib/check.nix) in line with v1 / cabal v2-test: - Set each installed package's `<pkg>_datadir` (the env var Cabal's `Paths_<pkg>` consults) to the `share` dir the slice stages under `$out/store/ghc-*/<unit>/share`, so `getDataFileName` finds `data-files` (the compiled-in datadir is an ephemeral build-time cabal dir). - Put the component's `build-tool-depends` (`executableToolDepends`, including same-package exes a test spawns) on PATH, so e.g. a test that spawns its package's exe no longer fails with `spawnProcess: ... does not exist`. - Run the test from a writable copy of the package source subdir (`passthru.srcSubDirPath`), so tests reading source-relative files (golden files / fixtures) find them — mirroring v1's unpack + cd. All three happen before `preCheck` so a project's own `preCheck` can still override them. Exes are unaffected (they install to the store with a correct, persistent datadir). Adds the `check-datadir` test: a library package shipping a data-file, a source-relative file, and a build-tool exe, with a test-suite that reads / spawns all three — run under both builderVersion 1 and 2.