aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/readline.scm
blob: 8200a24f1a1fed97af44f45f9263eb8977f83e2c (about) (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages readline)
  #:use-module (guix licenses)
  #:use-module (gnu packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages perl)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix utils)
  #:use-module (ice-9 format))

(define (patch-url version seqno)
  (format #f "mirror://gnu/readline/readline-~a-patches/readline~a-~3,'0d"
          version (string-join (string-split version #\.) "") seqno))

(define (readline-patch version seqno sha256-bv)
  "Return the origin of Readline patch SEQNO, with expected hash SHA256-BV"
  (origin
    (method url-fetch)
    (uri (patch-url version seqno))
    (sha256 sha256-bv)))

(define-syntax-rule (patch-series version (seqno hash) ...)
  (list (readline-patch version seqno (base32 hash))
        ...))

(define %patch-series-8.1
  (patch-series
   "8.1"
   (1 "0i4ikdqgcjnb40y2ss3lm09rq56zih5rzma3bib50dk3d1d4cak8")
   (2 "1p15sfx5xg5k4lam12lyd0givk7dfjddqpnb1jdp3c4clray0nz5")))

(define %patch-series-7.0
  (patch-series
   "7.0"
   (1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs")
   (2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7")
   (3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy")
   (4 "0r3bbaf12iz8m02z6p3fzww2m365fhn71xmzab2p62gj54s6h9gr")
   (5 "0lxpa4f72y2nsgj6fgrhjk2nmmxvccys6aciwfxwchb5f21rq5fa")))

(define-public readline
  (package
    (name "readline")
    (version (string-append "8.1."
                            (number->string (length %patch-series-8.1))))
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/readline/readline-"
                                  (version-major+minor version) ".tar.gz"))
              (sha256
               (base32
                "00ibp0n9crbwx15k9vvckq5wsipw98b1px8pd8i34chy2gpb9kpq"))
              (patches (append %patch-series-8.1
                               (search-patches "readline-link-ncurses.patch")))
              (patch-flags '("-p0"))))
    (build-system gnu-build-system)
    (propagated-inputs (list ncurses))
    (arguments
     (list #:configure-flags
           #~(list (string-append
                    "LDFLAGS=-Wl,-rpath -Wl,"
                    (dirname (search-input-file %build-inputs
                                                "lib/libncurses.so")))

                   ;; This test does an 'AC_TRY_RUN', which aborts when
                   ;; cross-compiling, so provide the correct answer.
                   #$@(if (%current-target-system)
                          '("bash_cv_wcwidth_broken=no")
                          '())
                   ;; MinGW: ncurses provides the termcap api.
                   #$@(if (target-mingw?)
                          '("bash_cv_termcap_lib=ncurses")
                          '()))

           #:make-flags
           (if (target-mingw?)
               ;; MinGW: termcap in ncurses
               ;; some SIG_* #defined in _POSIX
               #~'("TERMCAP_LIB=-lncurses"
                   "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'")
               #~'())))
    (synopsis "Edit command lines while typing, with history support")
    (description
     "The GNU readline library allows users to edit command lines as they
are typed in.  It can maintain a searchable history of previously entered
commands, letting you easily recall, edit and re-enter past commands.  It
features both Emacs-like and vi-like keybindings, making its usage
comfortable for anyone.")
    (license gpl3+)
    (home-page "https://savannah.gnu.org/projects/readline/")))

(define-public readline-7
  (package (inherit readline)
    (name "readline")
    (version (string-append "7.0."
                            (number->string (length %patch-series-7.0))))
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/readline/readline-"
                                  (version-major+minor version) ".tar.gz"))
              (sha256
               (base32
                "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm"))
              (patches (append
                        %patch-series-7.0
                        (search-patches "readline-link-ncurses.patch")))
              (patch-flags '("-p0"))))))

(define-public readline-6.2
  (package (inherit readline)
    (version "6.2")
    (source (origin (inherit (package-source readline))
              (method url-fetch)
              (uri (string-append "mirror://gnu/readline/readline-"
                                  version ".tar.gz"))
              (patches (search-patches "readline-6.2-CVE-2014-2524.patch"))
              (patch-flags '("-p0"))
              (sha256
               (base32
                "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"))))))

(define-public rlwrap
  (package
    (name "rlwrap")
    (version "0.46.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/hanslub42/rlwrap")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0shck0hb3jssk5l2pfylxgwrhlkwydj2ld6j7qk2ns2zviymg8n8"))))
    (build-system gnu-build-system)
    (native-inputs
     (list autoconf automake perl))
    (inputs
     (list readline))
    (synopsis "Wrapper to allow the editing of keyboard commands")
    (description
     "Rlwrap is a 'readline wrapper', a small utility that uses the GNU
readline library to allow the editing of keyboard input for any command.  You
should consider rlwrap especially when you need user-defined completion (by way
of completion word lists) and persistent history, or if you want to program
`special effects' using the filter mechanism.")
    (home-page "https://github.com/hanslub42/rlwrap")
    (license gpl2+)))
pdate. (ghc-cmark-gfm): Update. (ghc-concurrent-extra): Update. (ghc-concurrent-output): Update. (ghc-conduit-extra): Update. (ghc-constraints): Update. (ghc-convertible): Update. (ghc-csv): Update. (ghc-data-accessor): Update. (ghc-data-ordlist): Update. (ghc-dense-linear-algebra): Update. (ghc-diagrams-core): Update. (ghc-diff): Update. (ghc-dual-tree): Update. (ghc-either): Update. (ghc-errors): Update. (ghc-esqueleto): Update. (ghc-exactprint): Update. (ghc-extensible-exceptions): Update. (ghc-fail): Update. (ghc-filepath-bytestring): Update. (ghc-fingertree): Update. (ghc-fmlist): Update. (ghc-foldl): Update. (ghc-free): Update. (ghc-fsnotify): Update. (ghc-generic-random): Update. (ghc-genvalidity-property): Update. (ghc-groups): Update. (ghc-hackage-security): Update. (ghc-half): Update. (ghc-hashtables): Update. (ghc-haskell-src): Update. (ghc-haskell-src-exts-util): Update. (ghc-hourglass): Update. (ghc-hpack): Update. (ghc-hslua): Update. (ghc-hslua-module-system): Update. (ghc-http-api-data): Update. (ghc-ini): Update. (ghc-inline-c): Update. (ghc-inline-c-cpp): Update. (ghc-interpolate): Update. (ghc-intervals): Update. (ghc-invariant): Update. (ghc-io-streams): Update. (ghc-ipynb): Update. (ghc-kan-extensions): Update. (ghc-lens): Update. (ghc-libmpd): Update. (ghc-libyaml): Update. (ghc-lifted-async): Update. (ghc-linear): Update. (ghc-listlike): Update. (ghc-logict): Update. (ghc-lucid): Update. (ghc-lzma-conduit): Update. (ghc-magic): Update. (ghc-microlens-ghc): Update. (ghc-microlens-mtl): Update. (ghc-microlens-platform): Update. (ghc-missingh): Update. (ghc-mmorph): Update. (ghc-monad-control): Update. (ghc-monad-logger): Update. (ghc-monoid-extras): Update. (ghc-murmur-hash): Update. (ghc-ncurses): Update. (ghc-network-info): Update. (ghc-newtype-generics): Update. (ghc-openglraw): Update. (ghc-text-conversions): Update. (ghc-text-icu): Update. (ghc-text-short): Update. (ghc-text-zipper): Update. (ghc-parsers): Update. (ghc-path): Update. (ghc-peano): Update. (ghc-persistent): Update. (ghc-persistent-sqlite): Update. (ghc-process-extras): Update. (ghc-indexed-profunctors): Update. (ghc-project-template): Update. (ghc-psqueues): Update. (ghc-random): Update. (ghc-reducers): Update. (ghc-refact): Update. (ghc-regex-posix): Update. (ghc-resourcet): Update. (ghc-sdl): Update. (ghc-sdl2-image): Update. (ghc-sdl2-mixer): Update. (ghc-sdl2-ttf): Update. (ghc-sdl2-gfx): Update. (ghc-semigroupoids): Update. (ghc-semigroups): Update. (ghc-shakespeare): Update. (ghc-shelly): Update. (ghc-simple-reflect): Update. (ghc-size-based): Update. (ghc-skylighting-format-latex): Update. (ghc-skylighting-format-ansi): Update. (ghc-skylighting): Update. (ghc-sop-core): Update. (ghc-split): Update. (ghc-splitmix): Update. (ghc-statevar): Update. (ghc-statistics): Update. (ghc-stm-conduit): Update. (ghc-storable-complex): Update. (ghc-storablevector): Update. (ghc-svg-builder): Update. (ghc-temporary-rc): Update. (ghc-terminal-size): Update. (ghc-text-manipulate): Update. (ghc-th-abstraction): Update. (ghc-th-expand-syns): Update. (ghc-th-lift-instances): Update. (ghc-th-orphans): Update. (ghc-timezone-series): Update. (ghc-timezone-olson): Update. (ghc-tldr): Update. (ghc-transformers-compat): Update. (ghc-exception-transformers): Update. (ghc-trifecta): Update. (ghc-turtle): Update. (ghc-unagi-chan): Update. (ghc-unexceptionalio): Update. (ghc-unicode-transforms): Update. (ghc-unix-compat): Update. (ghc-unix-time): Update. (ghc-unliftio): Update. (ghc-commutative-semigroups): Update. (ghc-utf8-string): Update. (ghc-void): Update. (ghc-wl-pprint-text): Update. (ghc-x11-xft): Update. (ghc-xml): Update. (ghc-xml-hamlet): Update. (ghc-yaml): Update. (ghc-zip-archive): Update. (ghc-zlib): Update. (ghc-zstd): Update. (ghc-keys): Update. (ghc-pointed): Update. (ghc-lift-type): Update. (ghc-unicode-collation): Update. (ghc-citeproc): Update. (ghc-commonmark): Update. (ghc-commonmark-extensions): Update. (ghc-genvalidity-hspec): Update. (ghc-netlink): Update. (ghc-doctest-driver-gen): Update. (ghc-mysql): Update. (ghc-persistent-qq): Update. (ghc-persistent-mysql): Update. (ghc-string-conversions): Update. (ghc-postgresql-simple): Update. (ghc-persistent-postgresql): Update. (ghc-filtrable): Update. (ghc-hsyaml-aeson): Update. (ghc-singleton-bool): Update. (ghc-git-lfs): Update. (ghc-nothunks): Update. (ghc-onetuple): Update. (ghc-doctest-parallel): Update. (ghc-ordered-containers): Update. (ghc-hslua-marshalling): Update. (ghc-gridtables): Update. (ghc-should-not-typecheck): Update. (ghc-servant-server): Update. (ghc-recv): Update. (ghc-glib): Update. (ghc-pango): Update. (ghc-monoidal-containers): Update. (ghc-newtype): Update. (ghc-random-shuffle): Update. (ghc-ref-tf): Update. * gnu/packages/irc.scm (glirc): Update. * gnu/packages/purescript.scm (purescript): Update. * gnu/packages/wm.scm (icewm): Update. (ghc-xmobar): Update. Change-Id: I26ef7c2ef06e3075eba3da21947f16708c437f98 Lars-Dominik Braun 2024-04-04gnu: ghc-hmatrix: Switch to openblas....* gnu/packages/haskell-xyz.scm (ghc-hmatrix): Switch input dependency from lapack to openblas. Add configure flags. Change-Id: Ic8924b1fb9fa61af16abd1ac2a22c82a352a8e1b Signed-off-by: Ludovic Courtès <ludo@gnu.org> Romain GARBAGE 2023-11-21Merge branch 'master' into mesa-updates...Change-Id: I94c6874e5fdf916e3eb911f1a7df610cd3275474 John Kehayias 2023-11-19gnu: Add ghc-fdo-notify....* gnu/packages/haskell-xyz.scm (ghc-fdo-notify): New variable. Change-Id: I0722f9765c4ef02f6a9953b5f4824c60854e9a9d Efraim Flashner 2023-11-19gnu: Add ghc-git-lfs....* gnu/packages/haskell-xyz.scm (ghc-git-lfs): New variable. Change-Id: I3470899cbf9e5b3170abb6cc89d4029cad8aa182 Efraim Flashner 2023-11-15gnu: pandoc: Install bash completions, man page....* gnu/packages/haskell-xyz.scm (pandoc)[arguments]: Add a phase to install the bash completions and the man page. Change-Id: I3e5c18971e06cc3b69ed49a15ab8da11e809e532 Efraim Flashner 2023-11-15gnu: ghc-pandoc: Skip failing tests from i686-linux....* gnu/packages/haskell-xyz.scm (ghc-pandoc)[source]: Adjust snippet to remove two tests. Change-Id: I05476c0bc2f50328efb30ce26d446850321bad6d Efraim Flashner 2023-11-15gnu: ghc-persistent: Fix build on i686-linux....* gnu/packages/haskell-xyz.scm (ghc-persistent)[source]: Add patch. * gnu/packages/patches/ghc-persistent-fix-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I1b2c8419f3136d6c9df772d7c7abdc83a80d6112 Efraim Flashner 2023-11-15gnu: ghc-memory: Fix building on i686-linux....* gnu/packages/haskell-xyz.scm (ghc-memory)[source]: Add patch. * gnu/packages/patches/ghc-memory-fix-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I8dc7a13a94ce37021ad402b4e2d0cd061220f670 Efraim Flashner 2023-11-15gnu: ghc-bloomfilter: Update to 2.0.1.2....* gnu/packages/haskell-xyz.scm (ghc-bloomfilter): Update to 2.0.1.2. [source]: Remove patch. Add snippet to fix building on 32-bit systems. [arguments]: Remove field. [home-page]: Update to new home-page. * gnu/packages/patches/ghc-bloomfilter-ghc9.2.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Change-Id: Ie61d079b001f804fd28acaca2acd3127b88935d4 Efraim Flashner 2023-11-15gnu: ghc-base64: Skip tests on i686-linux....* gnu/packages/haskell-xyz.scm (ghc-base64)[arguments]: Skip tests when building for i686-linux. Change-Id: I2de264eb0a0b1ae3d6ca1e29c9b1dce589104aa1 Efraim Flashner 2023-11-15gnu: ghc-base64: Update to Cabal revision 4....* gnu/packages/haskell-xyz.scm (ghc-base64)[arguments]: Update to Cabal revision 4. [synopsis]: Satisfy linter. Change-Id: I3e234f85371865dfc45a4f004b442209fd68091a Efraim Flashner 2023-11-15gnu: ghc-basement: Fix build on i686-linux....* gnu/packages/haskell-xyz.scm (ghc-basement)[source]: Add patch. * gnu/packages/patches/ghc-basement-fix-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: Ife75c651d4b9cffa14ec1c5165a9254cfee3f09f Efraim Flashner 2023-11-14gnu: Add ghc-text-icu....* gnu/packages/haskell-xyz.scm (ghc-text-icu): New variable. Change-Id: I553f1fef4e76aeea6d09901917fd5d6032c23d46 Josselin Poiret