aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; 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 ncurses)
  #:use-module (gnu packages)
  #:use-module (guix licenses)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system perl)
  #:use-module (gnu packages)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages swig)
  #:use-module (gnu packages linux)
  #:use-module (guix utils)
  #:use-module ((guix memoization) #:select (mlambda))
  #:use-module (ice-9 match))

(define ncurses-rollup-patch
  (mlambda (version)
    (origin
      (method url-fetch)
      (uri (match (string-split (version-major+minor+point version) #\.)
             ((major minor point)
              (string-append "https://invisible-mirror.net/archives"
                             "/ncurses/" major "." minor "/ncurses-"
                             major "." minor "-" point "-patch.sh.bz2"))))
      (sha256
       (base32
        "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6")))))

(define-public ncurses
  (package
    (name "ncurses")
    (version "6.2.20210619")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/ncurses/ncurses-"
                                  (version-major+minor version)
                                  ".tar.gz"))
              (sha256
               (base32
                "17bcm2z1rdx5gmzj5fb8cp7f28aw5b4g2z4qvvqg3yg0fq66wc1h"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "doc"))                ;1 MiB of man pages
    (arguments
     (let ((patch-makefile-phase
            #~(lambda _
                (for-each patch-makefile-SHELL
                          (find-files "." "Makefile.in"))))
           (configure-phase
            ;; The 'configure' script does not understand '--docdir', so we must
            ;; override that and use '--mandir' instead.
            #~(lambda* (#:key build target outputs configure-flags
                        #:allow-other-keys)
                (let ((out (assoc-ref outputs "out"))
                      (doc (assoc-ref outputs "doc")))
                  (apply invoke "./configure"
                         (string-append "SHELL=" (which "sh"))
                         (string-append "--build=" build)
                         (string-append "--prefix=" out)
                         (string-append "--mandir=" doc "/share/man")
                         (if target
                             (cons (string-append "--host=" target)
                                   configure-flags)
                             configure-flags)))))
           (apply-rollup-patch-phase
            ;; Ncurses distributes "stable" patchsets to be applied on top
            ;; of the release tarball.  These are only available as shell
            ;; scripts(!) so we decompress and apply them in a phase.
            ;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
            #~(lambda* (#:key inputs native-inputs #:allow-other-keys)
                (let ((rollup-patch #$(ncurses-rollup-patch
                                       (package-version this-package))))
                  (copy-file rollup-patch
                             (string-append (getcwd) "/rollup-patch.sh.bz2"))
                  (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
                  (invoke "sh" "rollup-patch.sh"))))
           (remove-shebang-phase
            #~(lambda _
                ;; To avoid retaining a reference to the bootstrap Bash via the
                ;; shebang of the 'ncursesw6-config' script, simply remove that
                ;; shebang: it'll work just as well without it.  Likewise, do not
                ;; retain a reference to the "doc" output.
                (substitute* "misc/ncurses-config.in"
                  (("#!@SHELL@")
                   "# No shebang here, use /bin/sh!\n")
                  (("@SHELL@ \\$0")
                   "$0")
                  (("mandir=.*$")
                   "mandir=share/man"))))
           (post-install-phase
            #~(lambda* (#:key outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out")))
                  ;; When building a wide-character (Unicode) build, create backward
                  ;; compatibility links from the the "normal" libraries to the
                  ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
                  #$@(if (target-mingw?)
                         '( ;; TODO: create .la files to link to the .dll?
                           (with-directory-excursion (string-append out "/bin")
                             (for-each
                              (lambda (lib)
                                (define lib.dll
                                  (string-append "lib" lib ".dll"))
                                (define libw6.dll
                                  (string-append "lib" lib "w6.dll"))

                                (when (file-exists? libw6.dll)
                                  (format #t "creating symlinks for `lib~a'~%" lib)
                                  (symlink libw6.dll lib.dll)))
                              '("curses" "ncurses" "form" "panel" "menu"))))
                         #~())
                  (with-directory-excursion (string-append out "/lib")
                    (for-each (lambda (lib)
                                (define libw.a
                                  (string-append "lib" lib "w.a"))
                                (define lib.a
                                  (string-append "lib" lib ".a"))

                                #$@(if (not (target-mingw?))
                                       #~((define libw.so.x
                                            (string-append "lib" lib "w.so.6"))
                                          (define lib.so.x
                                            (string-append "lib" lib ".so.6"))
                                          (define lib.so
                                            (string-append "lib" lib ".so"))
                                          (define packagew.pc
                                            (string-append lib "w.pc"))
                                          (define package.pc
                                            (string-append lib ".pc")))
                                       #~())

                                (when (file-exists? libw.a)
                                  (format #t "creating symlinks for `lib~a'~%" lib)
                                  (symlink libw.a lib.a)
                                  #$@(if (not (target-mingw?))
                                         '((symlink libw.so.x lib.so.x)
                                           (false-if-exception (delete-file lib.so))
                                           (call-with-output-file lib.so
                                             (lambda (p)
                                               (format p "INPUT (-l~aw)~%" lib)))
                                           (with-directory-excursion "pkgconfig"
                                             (format #t "creating symlink for `~a'~%"
                                                     package.pc)
                                             (when (file-exists? packagew.pc)
                                               (symlink packagew.pc package.pc))))
                                         #~())))
                              '("curses" "ncurses" "form" "panel" "menu")))))))
       (list #:configure-flags
             #~`("--with-shared" "--without-debug" "--enable-widec"

                 "--enable-pc-files"
                 ,(string-append "--with-pkg-config-libdir="
                                 #$output "/lib/pkgconfig")

                 ;; By default headers land in an `ncursesw' subdir, which is not
                 ;; what users expect.
                 ,(string-append "--includedir=" #$output "/include")
                 "--enable-overwrite"                ;really honor --includedir

                 ;; Make sure programs like 'tic', 'reset', and 'clear' have a
                 ;; correct RUNPATH.
                 ,(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")

                 ;; Starting from ncurses 6.1, "make install" runs "install -s"
                 ;; by default, which doesn't work for cross-compiled binaries
                 ;; because it invokes 'strip' instead of 'TRIPLET-strip'.  Work
                 ;; around this.
                 #$@(if (%current-target-system) #~("--disable-stripping") #~())

                 ;; Do not assume a default search path in ld, even if it is only to
                 ;; filter it out in ncurses-config.  Mainly because otherwise it ends
                 ;; up using the libdir from binutils, which makes little sense and
                 ;; causes an unnecessary runtime dependency.
                 "cf_cv_ld_searchpath=/no-ld-searchpath"

                 ;; MinGW: Use term-driver created for the MinGW port.
                 #$@(if (target-mingw?) #~("--enable-term-driver") #~()))
             #:tests? #f                          ; no "check" target
             #:phases #~(modify-phases %standard-phases
                          (add-after 'unpack 'apply-rollup-patch
                            #$apply-rollup-patch-phase)
                          (replace 'configure #$configure-phase)
                          (add-after 'install 'post-install
                            #$post-install-phase)
                          (add-before 'configure 'patch-makefile-SHELL
                            #$patch-makefile-phase)
                          (add-before 'patch-source-shebangs 'remove-unneeded-shebang
                            #$remove-shebang-phase)))))
    (native-inputs
     (if (%current-target-system)
         (list pkg-config this-package)           ;for 'tic'
         (list pkg-config)))
    (native-search-paths
     (list (search-path-specification
            (variable "TERMINFO_DIRS")
            (files '("share/terminfo")))))
    (synopsis "Terminal emulation (termcap, terminfo) library")
    (description
     "GNU Ncurses is a library which provides capabilities to write text to
a terminal in a terminal-independent manner.  It supports pads and color as
well as multiple highlights and forms characters.  It is typically used to
implement user interfaces for command-line applications.  The accompanying
ncursesw library provides wide character support.")
    (license x11)
    (home-page "https://www.gnu.org/software/ncurses/")))

(define-public ncurses/gpm
  (package/inherit ncurses
    (name "ncurses-with-gpm")
    (arguments
     (substitute-keyword-arguments (package-arguments ncurses)
       ((#:configure-flags cf)
        #~(cons (string-append "--with-gpm="
                               #$(this-package-input "gpm")
                               "/lib/libgpm.so.2")
                #$cf))))
    (inputs (list gpm))))

;; Needed by u-boot 2022.04+
;; Consider merging into ncurses for next core-updates cycle.
(define-public ncurses/tinfo
  (package/inherit ncurses
    (name "ncurses-with-tinfo")
    (arguments
     (substitute-keyword-arguments (package-arguments ncurses)
       ((#:configure-flags cf)
        #~(cons "--with-termlib=tinfo" #$cf))))))

(define-public dialog
  (package
    (name "dialog")
    (version "1.3-20201126")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://invisible-mirror.net/archives/dialog/dialog-"
                    version ".tgz"))
              (sha256
               (base32
                "0riqmp2xl2j2yxx69nyg8jbm2fyi5fp4clcf6zi5jfm3irn3l8y9"))))
    (build-system gnu-build-system)
    (inputs
     (list ncurses))
    (synopsis "Curses widgets")
    (description "Dialog is a script-interpreter which provides a set of
curses widgets, such as dialog boxes.")
    (home-page "https://invisible-island.net/dialog/dialog.html")
    (license lgpl2.1)))

(define-public perl-curses
  (package
    (name "perl-curses")
    (version "1.36")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/G/GI/GIRAFFED/"
                           "Curses-" version ".tar.gz"))
       (sha256
        (base32
         "0r6xd9wr0c25rr28zixhqipak575zqsfb7r7f2693i9il1dpj554"))))
    (build-system perl-build-system)
    (inputs
     (list ncurses))
    (arguments
     `(#:make-maker-flags (list "PANELS" "MENUS")
       #:phases
       (modify-phases %standard-phases
         (add-before
           'configure 'set-curses-ldflags
           (lambda* (#:key inputs #:allow-other-keys)
             (let* ((ncurses (assoc-ref inputs "ncurses"))
                    (include (string-append ncurses "/include"))
                    (lib (string-append ncurses "/lib")))
               (setenv "CURSES_LIBTYPE" "ncurses")
               (setenv "CURSES_CFLAGS" (string-append "-I" include))
               (setenv "CURSES_PANEL_CFLAGS" (string-append "-I" include))
               (setenv "CURSES_MENU_CFLAGS" (string-append "-I" include))
               (setenv "CURSES_FORM_CFLAGS" (string-append "-I" include))
               (setenv "CURSES_LDFLAGS" (string-append "-L" lib " -lncurses"))
               (setenv "CURSES_PANEL_LDFLAGS" (string-append "-L" lib " -lpanel"))
               (setenv "CURSES_MENU_LDFLAGS" (string-append "-L" lib " -lmenu"))
               (setenv "CURSES_FORM_LDFLAGS" (string-append "-L" lib " -lform"))
               #t))))))
    (home-page "https://metacpan.org/release/Curses")
    (synopsis "Terminal screen handling and optimization")
    (description
     "@code{Curses} is the interface between Perl and the curses library
of your system.")
    (license perl-license)))

(define-public stfl
  (package
    (name "stfl")
    (version "0.24")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "http://www.clifford.at/stfl/stfl-"
                            version ".tar.gz"))
        (sha256
         (base32
          "1460d5lc780p3q38l3wc9jfr2a7zlyrcra0li65aynj738cam9yl"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f ; no test target
       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
                          (string-append "CC=" ,(cc-for-target)))
       #:phases
       (modify-phases %standard-phases
         (delete 'configure) ; there is no configure script
         ;; in our ncurses, the headers are in /include
         (add-before 'build 'patch-ncursesw
           (lambda _
             (substitute* "stfl_internals.h"
               (("ncursesw/") ""))))
         (add-after 'install 'install-missing-symlink
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (lib (string-append out "/lib")))
               ;; Some programs look for libstfl.so.0.
               (symlink "libstfl.so" (string-append lib "/libstfl.so.0"))))))))
    (inputs (list ncurses))
    (native-inputs (list ncurses swig))
    (home-page "https://www.clifford.at/stfl/")
    (synopsis "Structured terminal forms library")
    (description "Stfl is a library which implements a curses-based widget
set for text terminals.")
    (license lgpl3+)))
falls back to a ;; permissive licence. (license (list license:public-domain (license:x11-style "file://LICENCE")))))) (define-public cl-fiasco (sbcl-package->cl-source-package sbcl-fiasco)) (define-public ecl-fiasco (sbcl-package->ecl-package sbcl-fiasco)) (define-public sbcl-fiveam (package (name "sbcl-fiveam") (version "1.4.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/sionescu/fiveam") (commit (string-append "v" version)))) (file-name (git-file-name "fiveam" version)) (sha256 (base32 "04mh5plmlb15jbq3dkd8b9jl1dmbbg4hnd3k7859vpf6s12k5p4j")))) (inputs (list sbcl-alexandria sbcl-net.didierverna.asdf-flv sbcl-trivial-backtrace)) (build-system asdf-build-system/sbcl) (synopsis "Common Lisp testing framework") (description "FiveAM is a simple (as far as writing and running tests goes) regression testing framework. It has been designed with Common Lisp's interactive development model in mind.") (home-page "https://common-lisp.net/project/fiveam/") (license license:bsd-3))) (define-public cl-fiveam (sbcl-package->cl-source-package sbcl-fiveam)) (define-public ecl-fiveam (sbcl-package->ecl-package sbcl-fiveam)) (define-public sbcl-hamcrest (let ((commit "a54553e59a70dc5a539b683e79bfcdb0e8bae5c8") (revision "0")) (package (name "sbcl-hamcrest") (version "0.4.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/40ants/cl-hamcrest") (commit commit))) (sha256 (base32 "181nnb2fjbsdqjqdvwg2x9n1jjalkfzszwdgqcap4py2q63q1kxj")) (file-name (git-file-name "cl-hamcrest" commit)))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-iterate sbcl-split-sequence sbcl-cl-ppcre sbcl-alexandria sbcl-rove sbcl-prove)) (home-page "https://40ants.com/cl-hamcrest/") (synopsis "Make CL unit tests more readable") (description "@code{cl-hamcrest} is an implementation of the Hamcrest idea in Common Lisp. It simplifes unit tests and makes them more readable. Hamcrest uses the idea of pattern-matching, to construct matchers from different pieces and to apply them to the data.") (license license:bsd-3)))) (define-public cl-hamcrest (sbcl-package->cl-source-package sbcl-hamcrest)) (define-public ecl-cl-hamcrest (sbcl-package->ecl-package sbcl-hamcrest)) (define-public sbcl-hu.dwim.stefil (let ((commit "414902c6f575818c39a8a156b8b61b1adfa73dad")) (package (name "sbcl-hu.dwim.stefil") (version (git-version "0.0.0" "2" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hu-dwim/hu.dwim.stefil") (commit commit))) (sha256 (base32 "14izmjjim590rh74swrssavdmdznj2z8vhqixy780sjhpcr5pmkc")) (file-name (git-file-name "hu.dwim.stefil" version)))) (build-system asdf-build-system/sbcl) (native-inputs (list sbcl-hu.dwim.asdf)) (inputs (list sbcl-alexandria)) (home-page "http://dwim.hu/project/hu.dwim.stefil") (synopsis "Simple test framework") (description "Stefil is a simple test framework for Common Lisp, with a focus on interactive development.") (license license:public-domain)))) (define-public cl-hu.dwim.stefil (sbcl-package->cl-source-package sbcl-hu.dwim.stefil)) (define-public ecl-hu.dwim.stefil (sbcl-package->ecl-package sbcl-hu.dwim.stefil)) (define-public sbcl-kaputt (let ((commit "f26c9b0f8219fe61d86249198ef85174eecafc10") (revision "1")) (package (name "sbcl-kaputt") (version (git-version "0.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/foretspaisibles/cl-kaputt") (commit commit))) (file-name (git-file-name "kaputt" version)) (sha256 (base32 "10a78032vnf12kjjpfmq9ign38cad237ycyq37dwnx922nxjjaj4")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-cl-ppcre)) (home-page "https://github.com/foretspaisibles/cl-kaputt") (synopsis "Simple interactive test framework for Common Lisp") (description "KAPUTT is a test framework for Common Lisp that focuses on the following features: @itemize @item KAPUTT is simple, it only defines three abstractions testcase, assertion and protocol and does not add any artefact on the backtrace when errors occur. @item KAPUTT is extensible, it is possible to add problem-specific assertions to make test code more informative. @item KAPUTT fits well interactive development. @end itemize\n") (license license:cecill-b)))) (define-public ecl-kaputt (sbcl-package->ecl-package sbcl-kaputt)) (define-public cl-kaputt (sbcl-package->cl-source-package sbcl-kaputt)) (define-public sbcl-lift (let ((commit "a7941845a9de72be60e66ea941aa34cbee35bf23") (revision "3")) (package (name "sbcl-lift") (version (git-version "1.7.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hraban/lift") (commit commit))) (sha256 (base32 "1513n46fkqw8rnvz69s7xnwj476qm8ibdlwsr63qj9yh0mib0q6x")) (file-name (git-file-name "lift" version)) (modules '((guix build utils))) (snippet ;; Don't keep the bundled website `(begin (delete-file-recursively "website") #t)))) (build-system asdf-build-system/sbcl) (arguments ;; The tests require a debugger, but we run with the debugger disabled. '(#:tests? #f)) (synopsis "LIsp Framework for Testing") (description "The LIsp Framework for Testing (LIFT) is a unit and system test tool for LISP. Though inspired by SUnit and JUnit, it's built with Lisp in mind. In LIFT, testcases are organized into hierarchical testsuites each of which can have its own fixture. When run, a testcase can succeed, fail, or error. LIFT supports randomized testing, benchmarking, profiling, and reporting.") (home-page "https://github.com/gwkkwg/lift") (license license:expat)))) (define-public cl-lift (sbcl-package->cl-source-package sbcl-lift)) (define-public ecl-lift (sbcl-package->ecl-package sbcl-lift)) (define-public sbcl-lisp-unit (let ((commit "89653a232626b67400bf9a941f9b367da38d3815")) (package (name "sbcl-lisp-unit") (version (git-version "0.0.0" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/OdonataResearchLLC/lisp-unit") (commit commit))) (sha256 (base32 "0p6gdmgr7p383nvd66c9y9fp2bjk4jx1lpa5p09g43hr9y9pp9ry")) (file-name (git-file-name "lisp-unit" version)))) (build-system asdf-build-system/sbcl) (synopsis "Common Lisp Test framework inspired by JUnit to be simple of use") (description "@command{lisp-unit} is a Common Lisp library that supports unit testing. It is an extension of the library written by Chris Riesbeck.") (home-page "https://github.com/OdonataResearchLLC/lisp-unit") (license license:expat)))) (define-public cl-lisp-unit (sbcl-package->cl-source-package sbcl-lisp-unit)) (define-public ecl-lisp-unit (sbcl-package->ecl-package sbcl-lisp-unit)) (define-public sbcl-lisp-unit2 ;; There is a cyclical dependency between symbol-munger and lisp-unit2. ;; See https://github.com/AccelerationNet/symbol-munger/issues/4 (let ((commit "b5aa17b298cf2f669f4c0262c471e1ee4ab4699a") (revision "0")) (package (name "sbcl-lisp-unit2") (version (git-version "0.9.4" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/AccelerationNet/lisp-unit2") (commit commit))) (file-name (git-file-name "cl-lisp-unit2" version)) (sha256 (base32 "140nn22n1xv3qaash3x6h2h7xmys44s3f42b7bakfhpc4qlx0b69")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-alexandria sbcl-cl-interpol sbcl-iterate sbcl-symbol-munger)) (synopsis "Test Framework for Common Lisp") (description "LISP-UNIT2 is a Common Lisp library that supports unit testing in the style of JUnit for Java. It is a new version of the lisp-unit library written by Chris Riesbeck.") (home-page "https://github.com/AccelerationNet/lisp-unit2") (license license:expat)))) (define-public cl-lisp-unit2 (sbcl-package->cl-source-package sbcl-lisp-unit2)) (define-public ecl-lisp-unit2 (sbcl-package->ecl-package sbcl-lisp-unit2)) (define-public sbcl-nst (let ((commit "6c0990f594abcf5887e8d80f1035e3b60454b61b") (revision "1")) (package (name "sbcl-nst") (version (git-version "4.1.2" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jphmrst/cl-nst") (commit commit))) (file-name (git-file-name "nst" version)) (sha256 (base32 "1hf3r6pqbnd9vsd1i24qmz928kia72hdgmiafiwb6jw1hmj3r6ga")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-closer-mop sbcl-org-sampler)) (home-page "https://github.com/jphmrst/cl-nst") (synopsis "Unit testing for Common Lisp") (description "NST is a unit/regression testing system for Common Lisp.") (license license:llgpl)))) (define-public ecl-nst (sbcl-package->ecl-package sbcl-nst)) (define-public cl-nst (sbcl-package->cl-source-package sbcl-nst)) (define-public sbcl-parachute (let ((commit "bd072b0e4d0ff3ee2201eca3eb28c287686ab49e") (revision "1")) (package (name "sbcl-parachute") (version (git-version "1.5.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Shinmera/parachute") (commit commit))) (file-name (git-file-name "cl-parachute" version)) (sha256 (base32 "0srjsklhr04snlv98021mb0a5lb8dlypv1lnjdhsdhjbbiwbw2n9")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-documentation-utils sbcl-form-fiddle sbcl-trivial-custom-debugger)) (synopsis "Extensible and cross-compatible testing framework for Common Lisp") (description "Parachute is a simple-to-use and extensible testing framework. In Parachute, things are organised as a bunch of named tests within a package. Each test can contain a bunch of test forms that make up its body.") (home-page "https://shinmera.github.io/parachute/") (license license:zlib)))) (define-public cl-parachute (sbcl-package->cl-source-package sbcl-parachute)) (define-public ecl-parachute (sbcl-package->ecl-package sbcl-parachute)) (define-public sbcl-prove (let ((commit "5d71f02795b89e36f34e8c7d50e69b67ec6ca2de") (revision "2")) (package (name "sbcl-prove") (version (git-version "1.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/fukamachi/prove") (commit commit))) (sha256 (base32 "0ca6ha3zhmckq3ad9lxm6sbg4i0hg3m81xhan4dkxd3x9898jzpc")) (file-name (git-file-name "prove" version)))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-alexandria sbcl-cl-colors sbcl-cl-ppcre sbcl-cl-ansi-text)) (synopsis "Yet another unit testing framework for Common Lisp") (description "This project was originally called @command{cl-test-more}. @command{prove} is yet another unit testing framework for Common Lisp. The advantages of @command{prove} are: @itemize @item Various simple functions for testing and informative error messages @item ASDF integration @item Extensible test reporters @item Colorizes the report if it's available (note for SLIME) @item Reports test durations @end itemize\n") (home-page "https://github.com/fukamachi/prove") (license license:expat)))) (define-public cl-prove (sbcl-package->cl-source-package sbcl-prove)) (define-public ecl-prove (sbcl-package->ecl-package sbcl-prove)) (define-public sbcl-ptester (let ((commit "fe69fde54f4bce00ce577feb918796c293fc7253") (revision "1")) (package (name "sbcl-ptester") (version (git-version "2.1.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "http://git.kpe.io/ptester.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "1l0lfl7cdnr2qf4zh38hi4llxg22c49zkm639bdkmvlkzwj3ndwf")) (modules '((guix build utils))) (snippet ;; The useless bundled debian folder drags `make' into the closure. `(begin (delete-file-recursively "debian") #t)))) (build-system asdf-build-system/sbcl) (home-page "https://quickdocs.org/ptester/") (synopsis "Portable test harness package") (description "@command{ptester} is a portable testing framework based on Franz's tester module.") (license license:llgpl)))) (define-public cl-ptester (sbcl-package->cl-source-package sbcl-ptester)) (define-public ecl-ptester (sbcl-package->ecl-package sbcl-ptester)) (define-public sbcl-rove (let ((commit "6a5dfcdced42879a4eff2a529e7e8ce492fadf41") (revision "1")) (package (name "sbcl-rove") (version (git-version "0.10.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/fukamachi/rove") (commit commit))) (file-name (git-file-name "cl-rove" version)) (sha256 (base32 "1w99c0795ykhn14pfhyhvfzxzz0k1z1bb846xgz3iv19s0j2vykr")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-bordeaux-threads sbcl-dissect sbcl-trivial-gray-streams)) (home-page "https://github.com/fukamachi/rove") (synopsis "Yet another common lisp testing library") (description "Rove is a unit testing framework for Common Lisp applications. This is intended to be a successor of Prove.") (license license:bsd-3)))) (define-public cl-rove (sbcl-package->cl-source-package sbcl-rove)) (define-public ecl-rove (sbcl-package->ecl-package sbcl-rove)) (define-public sbcl-rt (let ((commit "a6a7503a0b47953bc7579c90f02a6dba1f6e4c5a") (revision "1")) (package (name "sbcl-rt") (version (git-version "1990.12.19" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "http://git.kpe.io/rt.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "13si2rrxaagbr0bkvg6sqicxxpyshabx6ad6byc9n2ik5ysna69b")) (modules '((guix build utils))) (snippet ;; The useless bundled debian folder drags `make' into the closure. `(begin (delete-file-recursively "debian") #t)))) (build-system asdf-build-system/sbcl) (synopsis "MIT Regression Tester") (description "RT provides a framework for writing regression test suites.") (home-page "https://www.cliki.net/rt") (license license:expat)))) (define-public cl-rt (sbcl-package->cl-source-package sbcl-rt)) (define-public ecl-rt (sbcl-package->ecl-package sbcl-rt)) (define-public sbcl-should-test (let ((commit "48facb9f9c07aeceb71fc0c48ce17fd7d54a09d4") (revision "0")) (package (name "sbcl-should-test") (version (git-version "1.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/vseloved/should-test") (commit commit))) (file-name (git-file-name "should-test" version)) (sha256 (base32 "1fqqa7lhf28qg60ji9libkylkcy747x576qpjn1y7c945j2fxmnm")))) (build-system asdf-build-system/sbcl) (inputs (list sbcl-cl-ppcre sbcl-local-time sbcl-osicat sbcl-rutils)) (home-page "https://github.com/vseloved/should-test") (synopsis "Minimal yet feature-rich Common Lisp test framework") (description "SHOULD-TEST is a methodology-agnostic and non-opinionated Common Lisp test framework, i.e. it doesn't care what kind of test approach you'd like to take.") (license license:expat)))) (define-public cl-should-test (sbcl-package->cl-source-package sbcl-should-test)) (define-public ecl-should-test (sbcl-package->ecl-package sbcl-should-test)) (define-public sbcl-simplet (package (name "sbcl-simplet") (version "1.2.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/noloop/simplet") (commit (string-append "v" version)))) (file-name (git-file-name "simplet" version)) (sha256 (base32 "1iwp3a43mns885k2arr7gbmyv5rsrjfvgarxickj7r2bfgwp1cnn")))) (build-system asdf-build-system/sbcl) (home-page "https://github.com/noloop/simplet") (synopsis "Simple test runner in Common Lisp") (description "This package provides a Common Lisp test runner system SIMPLET.") (license license:gpl3))) (define-public ecl-simplet (sbcl-package->ecl-package sbcl-simplet)) (define-public cl-simplet (sbcl-package->cl-source-package sbcl-simplet)) (define-public sbcl-stefil (let ((commit "0398548ec95dceb50fc2c2c03e5fb0ce49b86c7a") (revision "0")) (package (name "sbcl-stefil") (version (git-version "0.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.common-lisp.net/stefil/stefil.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0bqz64q2szzhf91zyqyssmvrz7da6442rs01808pf3wrdq28bclh")))) (build-system asdf-build-system/sbcl) (inputs `(("alexandria" ,sbcl-alexandria) ("iterate" ,sbcl-iterate) ("metabang-bind" ,sbcl-metabang-bind) ("swank" ,sbcl-slime-swank))) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'drop-unnecessary-dependency (lambda _ (substitute* "package.lisp" ((":stefil-system") "")) #t))))) (home-page "https://common-lisp.net/project/stefil/index-old.shtml") (synopsis "Simple test framework") (description "Stefil is a simple test framework for Common Lisp, with a focus on interactive development.") (license license:public-domain)))) (define-public cl-stefil (sbcl-package->cl-source-package sbcl-stefil)) (define-public ecl-stefil (sbcl-package->ecl-package sbcl-stefil)) (define-public sbcl-try (let ((commit "cf2a8887d091bf297b72ef69e15012e7e849ba3b") (revision "2")) (package (name "sbcl-try") (version (git-version "0.0.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/melisgl/try") (commit commit))) (file-name (git-file-name "cl-try" version)) (sha256 (base32 "166i3fqwxfv9skz6yf95c95nx0jjqy1ak1131bd0sqmd582gi9mg")))) (build-system asdf-build-system/sbcl) (native-inputs (list sbcl-cl-ppcre)) (inputs (list sbcl-alexandria sbcl-closer-mop sbcl-ieee-floats sbcl-mgl-pax sbcl-trivial-gray-streams)) (arguments `(;; FIXME: Get tests to work #:tests? #f)) (home-page "https://github.com/melisgl/try") (synopsis "Common Lisp test framework") (description "@code{Try} is a library for unit testing with equal support for interactive and non-interactive workflows. Tests are functions, and almost everything else is a condition, whose types feature prominently in parameterization.") (license license:expat)))) (define-public cl-try (sbcl-package->cl-source-package sbcl-try)) (define-public ecl-try (sbcl-package->ecl-package sbcl-try)) (define-public sbcl-unit-test (let ((commit "266afaf4ac091fe0e8803bac2ae72d238144e735") (revision "1")) (package (name "sbcl-unit-test") (version (git-version "0.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hanshuebner/unit-test") (commit commit))) (file-name (git-file-name "unit-test" version)) (sha256 (base32 "11hpksz56iqkv7jw25p2a8r3n9dj922fyarn16d98589g6hdskj9")))) (build-system asdf-build-system/sbcl) (home-page "https://github.com/hanshuebner/unit-test") (synopsis "Unit-testing framework for Common Lisp") (description "This is a unit-testing framework for Common Lisp.") (license license:unlicense)))) (define-public ecl-unit-test (sbcl-package->ecl-package sbcl-unit-test)) (define-public cl-unit-test (sbcl-package->cl-source-package sbcl-unit-test)) (define-public sbcl-xlunit (let ((commit "3805d34b1d8dc77f7e0ee527a2490194292dd0fc") (revision "1")) (package (name "sbcl-xlunit") (version (git-version "0.6.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "http://git.kpe.io/xlunit.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0argfmp9nghs4sihyj3f8ch9qfib2b7ll07v5m9ziajgzsfl5xw3")) (modules '((guix build utils))) (snippet ;; The useless bundled debian folder drags `make' into the closure. `(begin (delete-file-recursively "debian") #t)))) (build-system asdf-build-system/sbcl) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'fix-tests (lambda _ (substitute* "xlunit.asd" ((" :force t") "")) #t))))) (synopsis "Unit testing package for Common Lisp") (description "The XLUnit package is a toolkit for building test suites. It is based on the XPTest package by Craig Brozensky and the JUnit package by Kent Beck.") (home-page "https://quickdocs.org/xlunit/") (license license:bsd-3)))) (define-public cl-xlunit (sbcl-package->cl-source-package sbcl-xlunit)) (define-public ecl-xlunit (sbcl-package->ecl-package sbcl-xlunit)) (define-public sbcl-lisp-critic (let ((commit "ea19f82a168a6119ac1b10d0f457c01a7119602f") (revision "1")) (package (name "sbcl-lisp-critic") (version (git-version "1.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/g000001/lisp-critic") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "15zg05pqfs2dhc5j7gfkwjmxawaizjpyb0p7386mpl4w93l9h84l")))) (build-system asdf-build-system/sbcl) (synopsis "Common Lisp linter") (description "The Lisp Critic scans your code for instances of bad Lisp programming practice.") (home-page "https://courses.cs.northwestern.edu/325/exercises/critic.html#critic") (license license:expat)))) (define-public cl-lisp-critic (sbcl-package->cl-source-package sbcl-lisp-critic)) (define-public ecl-lisp-critic (sbcl-package->ecl-package sbcl-lisp-critic))