7 stdenv.mkDerivation (finalAttrs: {
9 version = "20240808-3.1";
12 url = "https://thrysoee.dk/editline/libedit-${finalAttrs.version}.tar.gz";
13 hash = "sha256-XwVzNJ13xKSJZxkc3WY03Xql9jmMalf+A3zAJpbWCZ8=";
16 outputs = [ "out" "dev" "man" ];
22 propagatedBuildInputs = [
26 # GCC automatically include `stdc-predefs.h` while Clang does not do this by
27 # default. While Musl is ISO 10646 compliant, it does not define
29 # This definition is in `stdc-predefs.h` -- that's why libedit builds just
30 # fine with GCC and Musl.
31 # There is a DR to fix this issue with Clang which is not merged yet.
32 # https://reviews.llvm.org/D137043
33 env.NIX_CFLAGS_COMPILE =
34 lib.optionalString (stdenv.targetPlatform.isMusl && stdenv.cc.isClang)
35 "-D__STDC_ISO_10646__=201103L";
38 find $out/lib -type f | \
39 grep '\.\(la\|pc\)''$' | \
40 xargs sed -i -e 's,-lncurses[a-z]*,-L${ncurses.out}/lib -lncursesw,g'
44 homepage = "http://www.thrysoee.dk/editline/";
45 changelog = "https://www.thrysoee.dk/editline/#changelog";
46 description = "Port of the NetBSD Editline library (libedit)";
48 This is an autotool- and libtoolized port of the NetBSD Editline library
49 (libedit). This Berkeley-style licensed command line editor library
50 provides generic line editing, history, and tokenization functions,
51 similar to those found in GNU Readline.
53 license = with lib.licenses; [ bsd3 ];
54 maintainers = with lib.maintainers; [ AndersonTorres ];
55 platforms = lib.platforms.all;