diff --git a/pkgs/tools/text/agrep/default.nix b/pkgs/tools/text/agrep/default.nix index 5d6eed458c0..10d3a47cc85 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 ' checkfil.c newmgrep.c recursiv.c + ''; installPhase = '' install -Dm 555 agrep -t "$out/bin" install -Dm 444 docs/* -t "$out/doc"