It would have been ~easy for someone to update bats without noticing
whether the update broke any packages that depend directly on the
nixpkgs-packaged bats for their tests. (I'm phrasing this tediously
because there are also some packages that vendor a copy of bats.)
Hopefully this will make it easier to confirm future updates.
Upcoming commit will add packages that use bats to passthru.tests,
which is a little more clear when this is one attrset.
Splitting this format-only change out for easier review.
I'm not going anywhere, I'm focusing my energy on other issues, and
getting pinged as a maintainer for packages is a bit distracting (also
I'm not using most of these packages anyways!)
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
Adds a `bats.withLibraries (p: [ ... ])` function, which creates a
`bats` wrapper where the `BATS_LIB_PATH` environment variable contains
fallbacks for the given list of libraries.
This allows to e.g. use the `bats-assert` library (which itself requires the
`bats-support` library) with
bats.withLibraries (p: [ p.bats-support p.bats-assert ])
In a `.bats` file you can then call `bats_load_library` [1] to load the
libraries in the `setup()` function:
setup() {
bats_load_library bats-support
bats_load_library bats-assert
}
[1]: https://bats-core.readthedocs.io/en/stable/writing-tests.html?highlight=library#bats-load-library-load-system-wide-libraries
I happily painted myself into a corner when converting bats to use
resholve. Since resholve tests itself with bats, all updates to
resholve now require rebuilding bats. The build itself is quick, but
the tests take a few minutes; moving them into passthru saves time. :)
The resholve 0.8.0 release includes better support for intra-package
references, making it possible to also resholve files in lib/libexec.
This process helped shake loose 5 more unnoticed package dependencies,
and enable bats' parallel execution support.