gnu: epic5: Improve style.

* gnu/packages/irc.scm (epic5): Run guix style.
This commit is contained in:
Nicolas Graves 2025-06-18 16:26:48 +02:00 committed by Andreas Enge
parent 4d1785dba3
commit d7832c1785
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -735,39 +735,50 @@ other enhancements and bug fixes.")
(package (package
(name "epic5") (name "epic5")
(version "2.0.1") (version "2.0.1")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://ftp.epicsol.org/pub/" (uri (string-append "http://ftp.epicsol.org/pub/"
"epic/EPIC5-PRODUCTION/" "epic/EPIC5-PRODUCTION/"
name "-" version ".tar.xz")) name
"-"
version
".tar.xz"))
(sha256 (sha256
(base32 (base32 "1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"))))
"1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" (list
#:test-target "test"
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-perl (add-after 'unpack 'patch-perl
(lambda _ (lambda _
(substitute* "regress/crash-irc" (substitute* "regress/crash-irc"
(("perl5") (which "perl"))) (("perl5")
#t)) (which "perl")))))
(add-after 'unpack 'patch-bsdinstall (add-after 'unpack 'patch-bsdinstall
;; If we just remove /bin/ some part of the bsdinstall breaks. ;; If we just remove /bin/ some part of the bsdinstall breaks.
;; Furthermore bsdinstalls has a reference to /etc/chmod here, which ;; Furthermore bsdinstalls has a reference to /etc/chmod here, which
;; means if we leave /etc/ in, install fails. ;; means if we leave /etc/ in, install fails.
(lambda _ (lambda _
(substitute* "bsdinstall" (substitute* "bsdinstall"
(("/bin/strip") "strip") (("/bin/strip")
(("/bin/cp") "cp") "strip")
(("/bin/chmod") "chmod") (("/bin/cp")
(("/bin/chgrp") "chgrp") "cp")
(("/bin/mkdir") "mkdir") (("/bin/chmod")
(("/bin/rm") "rm") "chmod")
(("/bin/mv") "mv") (("/bin/chgrp")
(("/etc/") "")) "chgrp")
#t)) (("/bin/mkdir")
"mkdir")
(("/bin/rm")
"rm")
(("/bin/mv")
"mv")
(("/etc/")
""))))
(replace 'configure (replace 'configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; The tarball uses a very old version of autconf. It does not ;; The tarball uses a very old version of autconf. It does not
@ -775,14 +786,18 @@ other enhancements and bug fixes.")
;; we need to invoke it with just what it understands. ;; we need to invoke it with just what it understands.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
;; 'configure' doesn't understand '--host'. ;; 'configure' doesn't understand '--host'.
,@(if (%current-target-system) #$@(if (%current-target-system)
`((setenv "CHOST" ,(%current-target-system))) `((setenv "CHOST"
,(%current-target-system)))
'()) '())
(setenv "CONFIG_SHELL" (which "bash")) (setenv "CONFIG_SHELL"
(setenv "SHELL" (which "bash")) (which "bash"))
(setenv "SHELL"
(which "bash"))
(invoke "./configure" (invoke "./configure"
(string-append "--prefix=" out) (string-append "--prefix=" out)
"--with-ipv6" "--with-libarchive" "--with-ipv6"
"--with-libarchive"
;; We use libressl because openssl does not come ;; We use libressl because openssl does not come
;; with the lib/libssl.a which is needed for epic5. ;; with the lib/libssl.a which is needed for epic5.
;; XXX: No matter which implementation is chosen, ;; XXX: No matter which implementation is chosen,
@ -794,15 +809,13 @@ other enhancements and bug fixes.")
(string-append "--with-tcl=" (string-append "--with-tcl="
(assoc-ref %build-inputs "tcl") (assoc-ref %build-inputs "tcl")
"/lib/tclConfig.sh")))))))) "/lib/tclConfig.sh"))))))))
(inputs (inputs (list libressl
(list libressl
ncurses ncurses
libarchive ; CHANGELOG: "Support for loading zip files" libarchive ;CHANGELOG: "Support for loading zip files"
perl perl
tcl tcl
ruby)) ruby))
(native-inputs (native-inputs (list pkg-config))
(list pkg-config))
(home-page "http://epicsol.org") (home-page "http://epicsol.org")
(synopsis "IRC Client") (synopsis "IRC Client")
(description (description