1 { stdenv, lib, fetchzip, bash, makeWrapper, coreutils, gnugrep, doCheck ? true }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/bats-core/bats-core/archive/v${version}.tar.gz";
9 hash = "sha256-+dboExOx2YELxV8Cwk9SVwk9G3p8EoP0LdaJ3o7GT6c=";
12 nativeBuildInputs = [ makeWrapper ];
20 wrapProgram $out/bin/bats --suffix PATH : "${lib.makeBinPath [ bash coreutils gnugrep ]}"
25 # TODO: cut if https://github.com/bats-core/bats-core/issues/418 allows
26 sed -i '/test works even if PATH is reset/a skip' test/bats.bats
28 # test generates file with absolute shebang dynamically
29 substituteInPlace test/install.bats --replace \
30 "/usr/bin/env bash" "${bash}/bin/bash"
35 homepage = "https://github.com/bats-core/bats-core";
36 description = "Bash Automated Testing System";
37 maintainers = with maintainers; [ abathur ];
38 license = licenses.mit;
39 platforms = platforms.unix;