about summary refs log tree commit diff
path: root/pkgs/development/interpreters/bats
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-05-02 11:46:37 +0200
committerDaiderd Jordan <daiderd@gmail.com>2020-05-02 11:46:37 +0200
commit727d9317fb465b2a9eb275a996bd449d118f2946 (patch)
tree90a2e668399be7e1318ab750cf2524b0764cf063 /pkgs/development/interpreters/bats
parenta0aae69936742b5998ad4be9341675a18de7ac06 (diff)
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.
Diffstat (limited to 'pkgs/development/interpreters/bats')
-rw-r--r--pkgs/development/interpreters/bats/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix
index 07b84247ef206..bbc38e515424e 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";