Use bats.withLibraries instead of submodules

This commit is contained in:
Sven van Heugten 2026-03-03 07:07:28 +01:00
parent f4cdb276c3
commit e9c8e3b35e
No known key found for this signature in database
GPG key ID: D612F88666F4F660
8 changed files with 16 additions and 20 deletions

9
.gitmodules vendored
View file

@ -1,9 +0,0 @@
[submodule "test/test_helper/bats-support"]
path = test/test_helper/bats-support
url = https://github.com/bats-core/bats-support.git
[submodule "test/test_helper/bats-assert"]
path = test/test_helper/bats-assert
url = https://github.com/bats-core/bats-assert.git
[submodule "test/test_helper/bats-file"]
path = test/test_helper/bats-file
url = https://github.com/bats-core/bats-file.git

View file

@ -16,7 +16,7 @@ You include a small bash script inside your commit messages, and `git-check-asse
## Building
```bash
nix build .?submodules=1
nix build .
```
## Examples of commit messages

View file

@ -33,7 +33,11 @@ resholve.mkDerivation {
nativeCheckInputs = [
shellcheck-minimal
bats
(bats.withLibraries (p: [
p.bats-assert
p.bats-support
p.bats-file
]))
gitMinimal
shfmt
];

View file

@ -16,9 +16,13 @@
{
packages.default = pkgs.callPackage ./default.nix { };
devShells.default = pkgs.mkShell {
packages = with pkgs; [
bats
shfmt
packages = [
(pkgs.bats.withLibraries (p: [
p.bats-assert
p.bats-support
p.bats-file
]))
pkgs.shfmt
];
};
}

View file

@ -3,9 +3,9 @@
setup() {
set -euo pipefail
load 'test_helper/bats-support/load'
load 'test_helper/bats-assert/load'
load 'test_helper/bats-file/load'
bats_load_library bats-support
bats_load_library bats-assert
bats_load_library bats-file
DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")" >/dev/null 2>&1 && pwd)"
PATH="$DIR/../bin:$PATH"

@ -1 +0,0 @@
Subproject commit 697471b7a89d3ab38571f38c6c7c4b460d1f5e35

@ -1 +0,0 @@
Subproject commit 6bee58bec7c2f4aed1a7425ccd4bdc42b4a84599

@ -1 +0,0 @@
Subproject commit 0954abb9925cad550424cebca2b99255d4eabe96