2020-05-02 10:46:37 +01:00
|
|
|
{ stdenv, fetchzip, coreutils, gnugrep }:
|
2016-02-07 11:11:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bats";
|
2020-05-02 03:31:25 +01:00
|
|
|
version = "1.2.0";
|
2016-02-07 11:11:31 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2018-08-23 20:14:59 +01:00
|
|
|
url = "https://github.com/bats-core/bats-core/archive/v${version}.tar.gz";
|
2020-05-02 03:31:25 +01:00
|
|
|
sha256 = "0f59zh4d4pa1a7ybs5zl6h0csbqqv11lbnq0jl1dgwm1s6p49bsq";
|
2016-02-07 11:11:31 +00:00
|
|
|
};
|
|
|
|
|
2018-10-27 14:18:53 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs ./install.sh
|
2020-05-02 10:46:37 +01:00
|
|
|
|
|
|
|
substituteInPlace ./libexec/bats-core/bats \
|
|
|
|
--replace 'type -p greadlink readlink' 'type -p ${coreutils}/bin/readlink'
|
|
|
|
substituteInPlace ./libexec/bats-core/bats-format-tap-stream \
|
|
|
|
--replace grep ${gnugrep}/bin/grep
|
2018-10-27 14:18:53 +01:00
|
|
|
'';
|
2016-03-01 00:19:27 +00:00
|
|
|
|
2016-02-07 11:11:31 +00:00
|
|
|
installPhase = "./install.sh $out";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bats-core/bats-core";
|
2016-02-07 11:11:31 +00:00
|
|
|
description = "Bash Automated Testing System";
|
|
|
|
maintainers = [ maintainers.lnl7 ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|