bats: add usage example to longDescription

The `bats` package provides a `withLibraries` function to easily include helper library such as `bats-assert` and `bats-support`.
However, this capability is not immediately visible to users browsing packages via `Nixpkgs Package Search`.

This commit adds a `longDescription` to document this feature, providing a code example on how to compose `bats` with its libraries.
This commit is contained in:
ryuryu333
2026-01-10 21:48:22 +09:00
parent d1845c648a
commit 4bab0c7984
+15
View File
@@ -255,6 +255,21 @@ resholve.mkDerivation rec {
meta = {
homepage = "https://github.com/bats-core/bats-core";
description = "Bash Automated Testing System";
longDescription = ''
Bats can be extended with libraries. The available libraries are:
bats-assert
bats-file
bats-detik
bats-support
An example of building this package with a few libraries:
bats.withLibraries (p: [
p.bats-assert
p.bats-support
])
'';
mainProgram = "bats";
maintainers = with lib.maintainers; [ abathur ];
license = lib.licenses.mit;