blob: cb9951cb8cf101506074a11945635264a27e23d9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{
lib,
mkDerivation,
libterminfo,
libcurses,
compatIfNeeded,
defaultMakeFlags,
}:
mkDerivation {
path = "lib/libedit";
buildInputs = [
libterminfo
libcurses
];
propagatedBuildInputs = compatIfNeeded;
SHLIBINSTALLDIR = "$(out)/lib";
makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ];
postPatch = ''
sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h
substituteInPlace $COMPONENT_PATH/config.h \
--replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" ""
substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include"
'';
env.NIX_CFLAGS_COMPILE = toString [
"-D__noinline="
"-D__scanflike(a,b)="
"-D__va_list=va_list"
];
}
|