diff options
Diffstat (limited to 'gnu/packages/irc.scm')
-rw-r--r-- | gnu/packages/irc.scm | 192 |
1 files changed, 174 insertions, 18 deletions
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index 39b915a518..04f6e016d0 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> ;;; Copyright © 2022 jgart <jgart@dismail.de> ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +45,7 @@ #:use-module (guix build-system haskell) #:use-module (guix build-system meson) #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix build-system qt) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -69,6 +71,7 @@ #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) + #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) @@ -76,6 +79,7 @@ #:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-crypto) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages javascript) #:use-module (gnu packages lua) #:use-module (gnu packages lxqt) #:use-module (gnu packages man) @@ -87,6 +91,7 @@ #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages prometheus) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-xyz) @@ -118,6 +123,10 @@ (list #:phases #~(modify-phases %standard-phases + (add-before 'configure 'update-constraints + (lambda _ + (substitute* "glirc.cabal" + (("vty\\s+>=5.35\\s+&&\\s+<5.36") "vty")))) (add-after 'install 'install-extra-documentation (lambda _ (install-file "glirc.1" @@ -359,14 +368,14 @@ Conferencing} and @acronym{ICB, Internet Citizen's Band}.") (define-public weechat (package (name "weechat") - (version "4.2.1") + (version "4.4.1") (source (origin (method url-fetch) (uri (string-append "https://weechat.org/files/src/weechat-" version ".tar.xz")) (sha256 (base32 - "1kdxj4pkxyzd9bdgk8h8rh26n7c5a8alnafxl8qm113cdw4dyg95")))) + "0v4k4rrp2a5zaxl86wnwffajv3b4fb9w70rsh42samra9k8hppp5")))) (build-system cmake-build-system) (outputs '("out" "doc")) (native-inputs @@ -389,7 +398,8 @@ Conferencing} and @acronym{ICB, Internet Citizen's Band}.") perl python ruby - tcl)) + tcl + cjson)) (arguments `(#:configure-flags (list "-DENABLE_PHP=OFF" @@ -508,7 +518,7 @@ for the IRCv3 protocol.") (define-public catgirl (package (name "catgirl") - (version "2.2") + (version "2.2a") (source (origin (method git-fetch) @@ -517,7 +527,7 @@ for the IRCv3 protocol.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0r1h10qdhhgy3359ndbjh269daivm126qc0c23db7bffv0xs4bff")))) + (base32 "0fvjx4a523bf2m522ya8r94ikhs8d864hrd85jn6bm414sga877p")))) (build-system gnu-build-system) (arguments (list @@ -622,13 +632,13 @@ highlighted. #:phases (modify-phases %standard-phases (delete 'configure)))) ; No ./configure script + (home-page "https://mcpcpc.github.io/kirc/") (synopsis "IRC client written in POSIX C99") (description "Kirc is an Internet Relay Chat (IRC) client. It includes support for Simple Authentication and Security Layer (SASL), the client-to-client (CTCP) protocol, simple chat history logging, synchronous message handling, multi-channel joining at server connection, full support for all RFC 2812 commands, and customized color scheme definitions.") - (home-page "http://kirc.io/index.html") (license license:expat))) (define-public limnoria @@ -753,6 +763,33 @@ interface for those who are accustomed to the ircII way of doing things.") ;; distribute binaries. (license:non-copyleft "http://epicsol.org/copyright"))))) +(define-public python-irc-parser-tests + (package + (name "python-irc-parser-tests") + (version "0.0.4") + (source + (origin + (method git-fetch) ; PyPI has a broken tests and data locations + (uri (git-reference + (url "https://github.com/ircdocs/parser-tests") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x0psq31f43d88b8jhaqwd9f1ykiqm4j13i8nxgcgkgp992cw002")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Tests require python-girc which fails to build on Python 3.10. + #:tests? #f)) + (propagated-inputs (list python-pyyaml)) + (home-page "https://github.com/ircdocs/parser-tests") + (synopsis "Tests for various IRC protocol parsers") + (description + "This package provides a library of tests for various IRC protocol +parsers") + (license (list license:cc0 + license:public-domain)))) + (define-public go-gopkg-in-irc-v3 (package (name "go-gopkg-in-irc-v3") @@ -768,19 +805,69 @@ interface for those who are accustomed to the ircII way of doing things.") (base32 "0f2vv947yf9ygy8ylwqkd9yshybfdsbsp9pffjyvm7l7rnq5da60")))) (build-system go-build-system) (arguments - '(;; TODO 3 tests fail because of missing files - ;; https://paste.sr.ht/~whereiseveryone/784d068887a65c1b869caa7d7c2077d28a2b2187 - #:tests? #f - #:import-path "gopkg.in/irc.v3" #:unpack-path "gopkg.in/irc.v3")) + (list + #:import-path "gopkg.in/irc.v3" + #:phases + #~(modify-phases %standard-phases + ;; Testscases is a git submodule to + ;; <https://github.com/go-irc/irc-parser-tests> which is an + ;; unmaintained clone of <https://github.com/ircdocs/parser-tests> + ;; which is packed in Guix as python-irc-parser-tests. Tests data + ;; (YAML files) are distributed as Python package and located in + ;; <lib/python3.10/site-packages/parser_tests/data/>. + (add-before 'check 'install-testcases-data + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (mkdir-p "./testcases/tests") + (for-each + (lambda (file) + (install-file file "./testcases/tests")) + (find-files + #$(this-package-native-input "python-irc-parser-tests") "\\.yaml$")))))))) + (native-inputs + (list go-github-com-stretchr-testify python-irc-parser-tests)) (propagated-inputs - `(("go-gopkg-in-yaml-v2" ,go-gopkg-in-yaml-v2) - ("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify))) + (list go-gopkg-in-yaml-v2)) (home-page "https://gopkg.in/irc.v3") (synopsis "Low-level IRC library for Go") (description "Package irc provides a simple IRC library meant as a building block for other projects.") (license license:expat))) +(define-public go-gopkg-in-irc-v4 + (package + (inherit go-gopkg-in-irc-v3) + (name "go-gopkg-in-irc-v4") + (version "4.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gopkg.in/irc.v4") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1yr7m1vz7fj0jbmk8njg54nyc9hx4kv24k13sjc4zj5fyqljj0p2")))) + (build-system go-build-system) + (arguments + (list + #:import-path "gopkg.in/irc.v4" + #:phases + #~(modify-phases %standard-phases + ;; testcases is renamed to _testcases in v4 for some reason. + (add-before 'check 'adjust-testcases-data + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (mkdir-p "./_testcases/tests") + (for-each + (lambda (file) + (install-file file "./_testcases/tests")) + (find-files + #$(this-package-native-input "python-irc-parser-tests") "\\.yaml$")))))))) + (propagated-inputs + (modify-inputs (package-propagated-inputs go-gopkg-in-irc-v3) + (append go-golang-org-x-time))))) + (define-public chathistorysync (package (name "chathistorysync") @@ -839,11 +926,11 @@ building block for other projects.") (base32 "1ag5x7h71pxjaaf4b561rwdqr05zzywkc0p3jf2yhg3lbjkjrc7z")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; There are no tests. - #:make-flags - (list - (string-append "CC=" ,(cc-for-target)) - (string-append "PREFIX=" %output)))) + (list #:tests? #f ; There are no tests. + #:make-flags + #~(list + (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)))) (native-inputs (list pkg-config universal-ctags)) (inputs @@ -966,7 +1053,7 @@ server written in C++ for Unix-like operating systems.") (invoke guile "--no-auto-compile" test))) #t tests)))))) - (add-after 'install 'install-script + (add-after 'build 'install-script (lambda _ (let* ((bash #$(this-package-input "bash-minimal")) (bash (string-append bash "/bin/bash")) @@ -1006,3 +1093,72 @@ server written in C++ for Unix-like operating systems.") now). It has some basic functionality only, such as seen, tell, and what.") (license license:gpl3+))) + +(define-public soju + (package + (name "soju") + (version "0.8.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/emersion/soju") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "10qc0g78yhsg6fnnb046jr0s592isw0r0mvydy6frgnx9rxac6k6")))) + (build-system go-build-system) + (arguments + (list + #:install-source? #f + #:import-path "codeberg.org/emersion/soju" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'adjust-makefile + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (substitute* "Makefile" + ;; Do not set dfault config path. + ((".*config_path.*:.*") "") + (("-X.*=.*config_path.*' ") "") + ((".*cp -f.*config_path.*") "") + ;; Prevent creating /var/lib/soju. + ((".*sharedstatedir.*") ""))))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (setenv "GOFLAGS" "-v -x -trimpath -tags=pam") + (setenv "SYSCONFDIR" (string-append #$output "/etc")) + (invoke "make")))) + (replace 'install + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (setenv "PREFIX" #$output) + (invoke "make" "install"))))))) + (native-inputs + (list go-git-sr-ht-emersion-go-scfg + go-git-sr-ht-emersion-go-sqlite3-fts5 + go-git-sr-ht-sircmpwn-go-bare + go-github-com-emersion-go-sasl + go-github-com-lib-pq + go-github-com-mattn-go-sqlite3 + go-github-com-msteinert-pam-v2 + go-github-com-pires-go-proxyproto + go-github-com-prometheus-client-golang + go-github-com-sherclockholmes-webpush-go + go-golang-org-x-crypto + go-golang-org-x-time + go-google-golang-org-protobuf + go-gopkg-in-irc-v4 + go-nhooyr-io-websocket + scdoc)) + (home-page "https://git.sr.ht/~emersion/soju") + (synopsis "User-friendly IRC bouncer") + (description + "Connects to upstream IRC servers on behalf of the user to provide +extra functionality. soju supports many features +such as multiple users, numerous @@url{https://ircv3.net/,IRCv3} extensions, +chat history playback and detached channels. It is well-suited for both small +and large deployments.") + (license license:agpl3))) + |