File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3- stdenv ,
43 fetchFromGitHub ,
4+ fetchpatch ,
5+ stdenv ,
56} :
67let
78 # This repository has numbered versions, but not Git tags.
@@ -18,6 +19,29 @@ stdenv.mkDerivation {
1819 hash = "sha256-2J4bw5BVZgTEcIn9IuD5Q8/L+8tldDbToDefuxDf85g=" ;
1920 } ;
2021
22+ patches = [
23+ # Implicit declaration of functions & implicit int
24+ # https://github.com/Wikinaut/agrep/pull/31
25+ ( fetchpatch {
26+ url = "https://patch-diff.githubusercontent.com/raw/Wikinaut/agrep/pull/31.patch" ;
27+ hash = "sha256-9ik2RANq12T/1vCUYTBNomzw+aJVa/LU2RsZovu3r3E=" ;
28+ } )
29+ ] ;
30+
31+ postPatch = ''
32+ # agrep only doesn't includes <sys/stat.h> for Linux
33+ # Starting from gcc14, this is a compiler error
34+ substituteInPlace checkfil.c recursiv.c \
35+ --replace-fail '#ifdef __APPLE__
36+ #include <sys/stat.h>
37+ #endif' '#include <sys/stat.h>'
38+
39+ substituteInPlace newmgrep.c \
40+ --replace-fail '#if defined(_WIN32) || defined(__APPLE__)
41+ #include <sys/stat.h>
42+ #endif' '#include <sys/stat.h>'
43+ '' ;
44+
2145 makeFlags = [ "CC=${ stdenv . cc . targetPrefix } cc" ] ;
2246
2347 env . NIX_CFLAGS_COMPILE = lib . optionalString stdenv . cc . isClang "-std=c89" ;
You can’t perform that action at this time.
0 commit comments