From 4bab0c79847efe7fa97f1fb563d70c9ba570e8af Mon Sep 17 00:00:00 2001 From: ryuryu333 Date: Sat, 10 Jan 2026 21:48:22 +0900 Subject: [PATCH] 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. --- pkgs/by-name/ba/bats/package.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/by-name/ba/bats/package.nix b/pkgs/by-name/ba/bats/package.nix index 44881b4b4cc3..8dfd6e1a2308 100644 --- a/pkgs/by-name/ba/bats/package.nix +++ b/pkgs/by-name/ba/bats/package.nix @@ -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;