gnu: txr: Improve style.

* gnu/packages/lisp.scm (txr)[arguments]: Use gexps.
  [home-page]: Update it.
This commit is contained in:
Guillaume Le Vaillant 2023-04-04 10:20:02 +02:00
parent 5295f0b1d2
commit b9c9c23939
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -1000,61 +1000,60 @@ the HTML documentation of TXR.")
(base32 "1ypsgakhak0znmg3wzblfcwd4s4nanzm61dz66gwi48rfnq35znl")))) (base32 "1ypsgakhak0znmg3wzblfcwd4s4nanzm61dz66gwi48rfnq35znl"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags (list #:configure-flags
(list ,(string-append "cc=" (cc-for-target)) #~(list (string-append "cc=" #$(cc-for-target))
(string-append "--prefix=" (assoc-ref %outputs "out"))) (string-append "--prefix=" #$output))
#:test-target "tests" #:test-target "tests"
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-license-installation (add-after 'unpack 'fix-license-installation
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(substitute* "Makefile" (substitute* "Makefile"
(("INSTALL(,.*LICENSE,.*)\\$\\(datadir\\)" _ match) (("INSTALL(,.*LICENSE,.*)\\$\\(datadir\\)" _ match)
(string-append "INSTALL" match (string-append "INSTALL" match #$output
(assoc-ref outputs "out") "/share/doc/" #$name "-" #$version)))))
"/share/doc/" ,name "-" ,version))))) (delete 'install-license-files)
(delete 'install-license-files) (add-after 'unpack 'inhibit-doc-syms-generation
(add-after 'unpack 'inhibit-doc-syms-generation (lambda _
(lambda _ (substitute* "genman.txr"
(substitute* "genman.txr" ;; Exit from genman.txr before it tries to write to
;; Exit from genman.txr before it tries to write to ;; stdlib/doc-syms.tl, which is anyway kept up to date
;; stdlib/doc-syms.tl, which is anyway kept up to date with ;; with each release (and is already compiled to
;; each release (and is already compiled to stdlib/doc-syms.tlo ;; stdlib/doc-syms.tlo when genman.txr is run).
;; when genman.txr is run). (("^@\\(output \"stdlib/doc-syms\\.tl\"\\).*" line)
(("^@\\(output \"stdlib/doc-syms\\.tl\"\\).*" line) (string-append "@(do (exit))\n" line)))))
(string-append "@(do (exit))\n" line))))) (add-after 'unpack 'fix-paths
(add-after 'unpack 'fix-paths (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) (substitute* "stream.c"
(substitute* "stream.c" (("/bin/sh")
(("/bin/sh") (search-input-file inputs "/bin/bash")))))
(string-append (assoc-ref inputs "bash") "/bin/bash"))))) (add-after 'unpack 'fix-tests
(add-after 'unpack 'fix-tests (lambda _
(lambda _ (substitute* (list "tests/017/realpath.tl"
(substitute* (list "tests/017/realpath.tl" "tests/017/realpath.expected")
"tests/017/realpath.expected") (("/usr/bin") "/"))))
(("/usr/bin") "/")))) (replace 'configure
(replace 'configure ;; ./configure is a hand-written script that can't handle
;; ./configure is a hand-written script that can't handle standard ;; standard autotools arguments like CONFIG_SHELL.
;; autotools arguments like CONFIG_SHELL. (lambda* (#:key configure-flags #:allow-other-keys)
(lambda* (#:key configure-flags #:allow-other-keys) (setenv "txr_shell" (which "bash"))
(setenv "txr_shell" (which "bash")) (apply invoke "./configure" configure-flags)))
(apply invoke "./configure" configure-flags))) (add-after 'build 'build-doc
(add-after 'build 'build-doc (lambda _
(lambda _ (setenv "GS_GENERATE_UUIDS" "0")
(setenv "GS_GENERATE_UUIDS" "0") (invoke "make" "txr-manpage.html" "txr-manpage.pdf")))
(invoke "make" "txr-manpage.html" "txr-manpage.pdf"))) (add-after 'install 'install-doc
(add-after 'install 'install-doc (lambda _
(lambda* (#:key outputs #:allow-other-keys) (let ((doc (string-append #$output "/share/doc/"
(let ((doc (string-append (assoc-ref outputs "out") #$name "-" #$version)))
"/share/doc/" ,name "-" ,version))) (for-each (lambda (f) (install-file f doc))
(for-each (lambda (f) (install-file f doc)) '("txr-manpage.html" "txr-manpage.pdf")))))
'("txr-manpage.html" "txr-manpage.pdf"))))) (add-after 'install 'install-vim-files
(add-after 'install 'install-vim-files (lambda _
(lambda* (#:key outputs #:allow-other-keys) (let ((syntax (string-append #$output
(let* ((out (assoc-ref outputs "out")) "/share/vim/vimfiles/syntax")))
(syntax (string-append out "/share/vim/vimfiles/syntax"))) (install-file "tl.vim" syntax)
(install-file "tl.vim" syntax) (install-file "txr.vim" syntax)))))))
(install-file "txr.vim" syntax)))))))
(native-inputs (native-inputs
;; Required to build the documentation. ;; Required to build the documentation.
(list ghostscript (list ghostscript
@ -1073,7 +1072,7 @@ extraction language referred to as the TXR Pattern Language (sometimes just
used for everything from \"one liner\" data transformation tasks at the used for everything from \"one liner\" data transformation tasks at the
command line, to data scanning and extracting scripts, to full application command line, to data scanning and extracting scripts, to full application
development in a wide-range of areas.") development in a wide-range of areas.")
(home-page "https://nongnu.org/txr/") (home-page "https://www.nongnu.org/txr/")
(license license:bsd-2))) (license license:bsd-2)))
(define picolisp32 (define picolisp32