Commit 4bab0c79 authored by ryuryu333's avatar ryuryu333
Browse files

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.
parent d1845c64
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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;