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