diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/readline')
10 files changed, 262 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/readline/6.3.nix b/nixpkgs/pkgs/development/libraries/readline/6.3.nix new file mode 100644 index 000000000000..88ad884bd489 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/6.3.nix @@ -0,0 +1,63 @@ +{ fetchurl, lib, stdenv, ncurses }: + +stdenv.mkDerivation { + pname = "readline"; + version = "6.3p08"; + + src = fetchurl { + url = "mirror://gnu/readline/readline-6.3.tar.gz"; + sha256 = "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn"; + }; + + outputs = [ "out" "dev" "man" "doc" "info" ]; + + propagatedBuildInputs = [ncurses]; + + patchFlags = [ "-p0" ]; + + configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + # This test requires running host code + "bash_cv_wcwidth_broken=no"; + + patches = + [ ./link-against-ncurses.patch + ./no-arch_only-6.3.patch + ] ++ lib.optional stdenv.hostPlatform.useAndroidPrebuilt ./android.patch + ++ + (let + patch = nr: sha256: + fetchurl { + url = "mirror://gnu/readline/readline-6.3-patches/readline63-${nr}"; + inherit sha256; + }; + in + import ./readline-6.3-patches.nix patch); + + meta = with lib; { + description = "Library for interactive line editing"; + + longDescription = '' + The GNU Readline library provides a set of functions for use by + applications that allow users to edit command lines as they are + typed in. Both Emacs and vi editing modes are available. The + Readline library includes additional functions to maintain a + list of previously-entered command lines, to recall and perhaps + reedit those lines, and perform csh-like history expansion on + previous commands. + + The history facilities are also placed into a separate library, + the History library, as part of the build process. The History + library may be used without Readline in applications which + desire its capabilities. + ''; + + homepage = "https://savannah.gnu.org/projects/readline/"; + + license = licenses.gpl3Plus; + + maintainers = [ ]; + + platforms = platforms.unix; + branch = "6.3"; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/readline/7.0.nix b/nixpkgs/pkgs/development/libraries/readline/7.0.nix new file mode 100644 index 000000000000..25ef4b97a863 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/7.0.nix @@ -0,0 +1,62 @@ +{ fetchurl, lib, stdenv, ncurses +}: + +stdenv.mkDerivation rec { + pname = "readline"; + version = "7.0p${toString (builtins.length upstreamPatches)}"; + + src = fetchurl { + url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz"; + sha256 = "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm"; + }; + + outputs = [ "out" "dev" "man" "doc" "info" ]; + + propagatedBuildInputs = [ncurses]; + + patchFlags = [ "-p0" ]; + + upstreamPatches = + (let + patch = nr: sha256: + fetchurl { + url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline70-${nr}"; + inherit sha256; + }; + in + import ./readline-7.0-patches.nix patch); + + patches = + [ ./link-against-ncurses.patch + ./no-arch_only-6.3.patch + ] + ++ upstreamPatches; + + meta = with lib; { + description = "Library for interactive line editing"; + + longDescription = '' + The GNU Readline library provides a set of functions for use by + applications that allow users to edit command lines as they are + typed in. Both Emacs and vi editing modes are available. The + Readline library includes additional functions to maintain a + list of previously-entered command lines, to recall and perhaps + reedit those lines, and perform csh-like history expansion on + previous commands. + + The history facilities are also placed into a separate library, + the History library, as part of the build process. The History + library may be used without Readline in applications which + desire its capabilities. + ''; + + homepage = "https://savannah.gnu.org/projects/readline/"; + + license = licenses.gpl3Plus; + + maintainers = [ ]; + + platforms = platforms.unix; + branch = "7.0"; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/readline/8.1.nix b/nixpkgs/pkgs/development/libraries/readline/8.1.nix new file mode 100644 index 000000000000..35835c1a1436 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/8.1.nix @@ -0,0 +1,62 @@ +{ fetchurl, stdenv, lib, ncurses +}: + +stdenv.mkDerivation rec { + pname = "readline"; + version = "8.1p${toString (builtins.length upstreamPatches)}"; + + src = fetchurl { + url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz"; + sha256 = "00ibp0n9crbwx15k9vvckq5wsipw98b1px8pd8i34chy2gpb9kpq"; + }; + + outputs = [ "out" "dev" "man" "doc" "info" ]; + + propagatedBuildInputs = [ncurses]; + + patchFlags = [ "-p0" ]; + + upstreamPatches = + (let + patch = nr: sha256: + fetchurl { + url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline81-${nr}"; + inherit sha256; + }; + in + import ./readline-8.1-patches.nix patch); + + patches = + [ ./link-against-ncurses.patch + ./no-arch_only-6.3.patch + ] + ++ upstreamPatches; + + meta = with lib; { + description = "Library for interactive line editing"; + + longDescription = '' + The GNU Readline library provides a set of functions for use by + applications that allow users to edit command lines as they are + typed in. Both Emacs and vi editing modes are available. The + Readline library includes additional functions to maintain a + list of previously-entered command lines, to recall and perhaps + reedit those lines, and perform csh-like history expansion on + previous commands. + + The history facilities are also placed into a separate library, + the History library, as part of the build process. The History + library may be used without Readline in applications which + desire its capabilities. + ''; + + homepage = "https://savannah.gnu.org/projects/readline/"; + + license = licenses.gpl3Plus; + + maintainers = with maintainers; [ dtzWill ]; + + platforms = platforms.unix; + branch = "8.1"; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/readline/android.patch b/nixpkgs/pkgs/development/libraries/readline/android.patch new file mode 100644 index 000000000000..7e81774be369 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/android.patch @@ -0,0 +1,16 @@ +diff --git histlib.h histlib.h +index c938a10..925ab72 100644 +--- histlib.h ++++ histlib.h +@@ -51,9 +51,9 @@ + #endif + + #ifndef member +-# ifndef strchr ++# if !defined (strchr) && !defined (__STDC__) + extern char *strchr (); +-# endif ++# endif /* !strchr && !__STDC__ */ + #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) + #endif + diff --git a/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch new file mode 100644 index 000000000000..0fd0598f4650 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch @@ -0,0 +1,18 @@ +This patch is to make sure that `libncurses' is among the `NEEDED' +dependencies of `libreadline.so' and `libhistory.so'. + +Failing to do that, applications linking against Readline are +forced to explicitly link against libncurses as well; in addition, +this trick doesn't work when using GNU ld's `--as-needed'. + +--- shlib/Makefile.in 2009-01-06 18:03:22.000000000 +0100 ++++ shlib/Makefile.in 2009-07-27 14:43:25.000000000 +0200 +@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ + SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ + SHOBJ_LIBS = @SHOBJ_LIBS@ + +-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ ++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses + SHLIB_LIBS = @SHLIB_LIBS@ + + SHLIB_DOT = @SHLIB_DOT@ diff --git a/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch new file mode 100644 index 000000000000..7c46dbad962a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch @@ -0,0 +1,13 @@ +diff -ru -x '*~' readline-6.3-orig/support/shobj-conf readline-6.3/support/shobj-conf +--- support/shobj-conf 2014-02-24 03:06:29.000000000 +0100 ++++ support/shobj-conf 2014-07-22 11:18:52.000000000 +0200 +@@ -194,9 +194,6 @@ + # Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4 + *) + case "${host_os}" in +- darwin[89]*|darwin1[012]*) +- SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`' +- ;; + *) # Mac OS X 10.9 (Mavericks) and later + SHOBJ_ARCHFLAGS= + # for 32 and 64bit universal library diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix new file mode 100644 index 000000000000..d0aaaf38f706 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix @@ -0,0 +1,12 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "0vqlj22mkbn3x42qx2iqir7capx462dhagbzdw6hwxgfxavbny8s") +(patch "002" "19g0l6vlfcqzwfwjj1slkmxzndjp4543hwrf26g8z216lp3h9qrr") +(patch "003" "0bx53k876w8vwf4h2s6brr1i46ym87gi71bh8zl89n0gn3cbshgc") +(patch "004" "1k2m8dg1awmjhmivdbx1c25866gfbpg0fy4845n8cw15zc3bjis5") +(patch "005" "0jr7c28bzn882as5i54l53bhi723s1nkvzmwlh3rj6ld4bwqhxw7") +(patch "006" "0mp5zgx50792gigkmjap3d0zpdv5qanii8djab7j6z69qsrpl8sw") +(patch "007" "1sjv9w0mglh395i6hlq3ck7wdxvi2wyddlyb2j0jwg7cmnibayad") +(patch "008" "11rpqhsxd132gc8455v51ma3a5zshznb0mh2p0zc5skcab7r7h1v") +] diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix new file mode 100644 index 000000000000..c34ef2bf97bb --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix @@ -0,0 +1,9 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs") +(patch "002" "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7") +(patch "003" "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy") +(patch "004" "0r3bbaf12iz8m02z6p3fzww2m365fhn71xmzab2p62gj54s6h9gr") +(patch "005" "0lxpa4f72y2nsgj6fgrhjk2nmmxvccys6aciwfxwchb5f21rq5fa") +] diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-8.1-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-8.1-patches.nix new file mode 100644 index 000000000000..b2aaadf0e9b5 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/readline-8.1-patches.nix @@ -0,0 +1,6 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "0i4ikdqgcjnb40y2ss3lm09rq56zih5rzma3bib50dk3d1d4cak8") +(patch "002" "1p15sfx5xg5k4lam12lyd0givk7dfjddqpnb1jdp3c4clray0nz5") +] diff --git a/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh b/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh new file mode 120000 index 000000000000..d4f5cd2f3126 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh @@ -0,0 +1 @@ +../../../shells/bash/update-patch-set.sh \ No newline at end of file |