From 4bab0c79847efe7fa97f1fb563d70c9ba570e8af Mon Sep 17 00:00:00 2001 From: ryuryu333 Date: Sat, 10 Jan 2026 21:48:22 +0900 Subject: [PATCH 1/2] 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; From 43cfd42b4d8eadf2c2ee58fcfea17f930d4eae6f Mon Sep 17 00:00:00 2001 From: ryu <135518701+ryuryu333@users.noreply.github.com> Date: Sun, 11 Jan 2026 16:21:21 +0900 Subject: [PATCH 2/2] bats: improve longDescription formatting Apply suggestions to use markdown fenced code blocks for the usage example and bullet points for the library list. Co-authored-by: Aleksana --- pkgs/by-name/ba/bats/package.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ba/bats/package.nix b/pkgs/by-name/ba/bats/package.nix index 8dfd6e1a2308..5396fb6ffa22 100644 --- a/pkgs/by-name/ba/bats/package.nix +++ b/pkgs/by-name/ba/bats/package.nix @@ -258,17 +258,18 @@ resholve.mkDerivation rec { longDescription = '' Bats can be extended with libraries. The available libraries are: - bats-assert - bats-file - bats-detik - bats-support + - `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 - ]) + ```nix + bats.withLibraries (p: [ + p.bats-assert + p.bats-support + ]) + ``` ''; mainProgram = "bats"; maintainers = with lib.maintainers; [ abathur ];