bats: fixup readlink reference

Using `readlink -f` requires coreutils, on platforms like darwin where
this isn't the GNU variant by default it would fail outide of a
nix-shell.
gstqt5
Daiderd Jordan 2020-05-02 11:46:37 +02:00
parent a0aae69936
commit 727d9317fb
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, gnugrep }:
{ stdenv, fetchzip, coreutils, gnugrep }:
stdenv.mkDerivation rec {
pname = "bats";
@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
patchPhase = ''
patchShebangs ./install.sh
substituteInPlace ./libexec/bats-core/bats-format-tap-stream --replace grep ${gnugrep}/bin/grep
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
'';
installPhase = "./install.sh $out";