Merge #278061: libedit: update and adopt

...into staging

+56 -45
+56
pkgs/by-name/li/libedit/package.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , ncurses 5 + }: 6 + 7 + stdenv.mkDerivation (finalAttrs: { 8 + pname = "libedit"; 9 + version = "20230828-3.1"; 10 + 11 + src = fetchurl { 12 + url = "https://thrysoee.dk/editline/libedit-${finalAttrs.version}.tar.gz"; 13 + hash = "sha256-TugYK25WkpDn0fRPD3jayHFrNfZWt2Uo9pnGnJiBTa0="; 14 + }; 15 + 16 + outputs = [ "out" "dev" "man" ]; 17 + 18 + patches = [ 19 + ./01-cygwin.patch 20 + ]; 21 + 22 + propagatedBuildInputs = [ 23 + ncurses 24 + ]; 25 + 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 28 + # __STDC_ISO_10646__. 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"; 36 + 37 + postFixup = '' 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' 41 + ''; 42 + 43 + meta = { 44 + homepage = "http://www.thrysoee.dk/editline/"; 45 + description = "A port of the NetBSD Editline library (libedit)"; 46 + longDescription = '' 47 + This is an autotool- and libtoolized port of the NetBSD Editline library 48 + (libedit). This Berkeley-style licensed command line editor library 49 + provides generic line editing, history, and tokenization functions, 50 + similar to those found in GNU Readline. 51 + ''; 52 + license = with lib.licenses; [ bsd3 ]; 53 + maintainers = with lib.maintainers; [ AndersonTorres ]; 54 + platforms = lib.platforms.all; 55 + }; 56 + })
pkgs/development/libraries/libedit/01-cygwin.patch pkgs/by-name/li/libedit/01-cygwin.patch
-43
pkgs/development/libraries/libedit/default.nix
··· 1 - { lib, stdenv, fetchurl, ncurses }: 2 - 3 - stdenv.mkDerivation rec { 4 - pname = "libedit"; 5 - version = "20230828-3.1"; 6 - 7 - src = fetchurl { 8 - url = "https://thrysoee.dk/editline/${pname}-${version}.tar.gz"; 9 - sha256 = "sha256-TugYK25WkpDn0fRPD3jayHFrNfZWt2Uo9pnGnJiBTa0="; 10 - }; 11 - 12 - outputs = [ "out" "dev" ]; 13 - 14 - # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. 15 - # NROFF = "${groff}/bin/nroff"; 16 - 17 - # GCC automatically include `stdc-predefs.h` while Clang does not do 18 - # this by default. While Musl is ISO 10646 compliant, doesn't define 19 - # __STDC_ISO_10646__. This definition is in `stdc-predefs.h` that's 20 - # why libedit builds just fine with GCC and Musl. 21 - # There is a DR to fix this issue with Clang which is not merged 22 - # yet. 23 - # https://reviews.llvm.org/D137043 24 - env.NIX_CFLAGS_COMPILE = 25 - lib.optionalString (stdenv.targetPlatform.isMusl && stdenv.cc.isClang) 26 - "-D__STDC_ISO_10646__=201103L"; 27 - 28 - patches = [ ./01-cygwin.patch ]; 29 - 30 - propagatedBuildInputs = [ ncurses ]; 31 - 32 - postInstall = '' 33 - find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ 34 - -e 's,-lncurses[a-z]*,-L${ncurses.out}/lib -lncursesw,g' 35 - ''; 36 - 37 - meta = with lib; { 38 - homepage = "http://www.thrysoee.dk/editline/"; 39 - description = "A port of the NetBSD Editline library (libedit)"; 40 - license = licenses.bsd3; 41 - platforms = platforms.all; 42 - }; 43 - }
-2
pkgs/top-level/all-packages.nix
··· 22480 22480 22481 22481 libebur128 = callPackage ../development/libraries/libebur128 { }; 22482 22482 22483 - libedit = callPackage ../development/libraries/libedit { }; 22484 - 22485 22483 libei = callPackage ../development/libraries/libei { }; 22486 22484 22487 22485 libelf = callPackage ../development/libraries/libelf { };