From 727d9317fb465b2a9eb275a996bd449d118f2946 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 2 May 2020 11:46:37 +0200 Subject: [PATCH] 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. --- pkgs/development/interpreters/bats/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix index 07b84247ef2..bbc38e51542 100644 --- a/pkgs/development/interpreters/bats/default.nix +++ b/pkgs/development/interpreters/bats/default.nix @@ -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";