about summary refs log tree commit diff
path: root/pkgs/tools/text/agrep
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-13 13:34:27 -0600
committerWill Dietz <w@wdtz.org>2018-02-13 09:44:51 -0600
commitbe2997353de11a06b58f0a5f0184ca1218ba41b0 (patch)
tree6c3d2413c7b4158f3072550ac0d746e23f1c0779 /pkgs/tools/text/agrep
parentcd50057a6106a3f230ae8d08c50ba48dbd6b0328 (diff)
downloadnixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar.gz
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar.bz2
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar.lz
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar.xz
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.tar.zst
nixlib-be2997353de11a06b58f0a5f0184ca1218ba41b0.zip
agrep: patch to fix on musl, darwin
Diffstat (limited to 'pkgs/tools/text/agrep')
-rw-r--r--pkgs/tools/text/agrep/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/tools/text/agrep/default.nix b/pkgs/tools/text/agrep/default.nix
index 5d6eed458c0d..10d3a47cc85e 100644
--- a/pkgs/tools/text/agrep/default.nix
+++ b/pkgs/tools/text/agrep/default.nix
@@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
     sha256 = "14addnwspdf2mxpqyrw8b84bb2257y43g5ccy4ipgrr91fmxq2sk";
   };
 
+  # Related: https://github.com/Wikinaut/agrep/pull/11
+  prePatch = stdenv.lib.optionalString (stdenv.hostPlatform.isMusl || stdenv.isDarwin) ''
+    sed -i '1i#include <sys/stat.h>' checkfil.c newmgrep.c recursiv.c
+  '';
   installPhase = ''
     install -Dm 555 agrep -t "$out/bin"
     install -Dm 444 docs/* -t "$out/doc"