;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; 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 . (define-module (gnu home services messaging) #:use-module (srfi srfi-26) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu packages messaging) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (guix records) #:use-module (guix gexp) #:export (home-znc-configuration home-znc-service-type)) ;;; ;;; Znc. ;;; (define-record-type* home-znc-configuration make-home-znc-configuration home-znc-configuration? (znc home-znc-znc ;string (default znc)) (extra-options home-znc-extra-options ;list of string (default '()))) (define (home-znc-services config) "Return a for znc with CONFIG." (match-record config (znc extra-options) (let* ((znc (file-append znc "/bin/znc")) (command #~'(#$znc "--foreground" #$@extra-options)) (log-file #~(string-append %user-log-dir "/znc.log"))) (list (shepherd-service (documentation "Run the znc IRC bouncer.") (provision '(znc)) (modules '((shepherd support))) ;for '%user-log-dir' (start #~(make-forkexec-constructor #$command #:log-file #$log-file)) (stop #~(make-kill-destructor))))))) (define home-znc-service-type (service-type (name 'home-znc) (default-value (home-znc-configuration)) (extensions (list (service-extension home-shepherd-service-type home-znc-services))) (description "Install and configure @command{znc}, an @acronym{IRC, Internet Relay Chat} bouncer, as a Shepherd service."))) tests: Use quasiquoted 'match' patterns for package sexps....Turns out it's easier to read. * tests/cpan.scm ("cpan->guix-package"): Use a quasiquoted pattern. * tests/elpa.scm (eval-test-with-elpa): Likewise. * tests/gem.scm ("gem->guix-package") ("gem->guix-package with a specific version") ("gem-recursive-import") ("gem-recursive-import with a specific version"): Likewise. * tests/hexpm.scm ("hexpm-recursive-import"): Likewise. * tests/opam.scm ("opam->guix-package"): Likewise. * tests/pypi.scm ("pypi->guix-package, no wheel") ("pypi->guix-package, wheels") ("pypi->guix-package, no usable requirement file.") ("pypi->guix-package, package name contains \"-\" followed by digits"): Likewise. * tests/texlive.scm ("texlive->guix-package"): Likewise. Ludovic Courtès 2023-05-31import: gem: Updater provides input list....* guix/import/gem.scm (import-release): Add 'inputs' field. * tests/gem.scm ("package-latest-release"): New test. Ludovic Courtès 2023-05-31import: gem: Factorize "bundler" special case for name mapping....* guix/import/gem.scm (ruby-package-name): Add "bundler" special case. (gem->guix-package): Adjust accordingly. * tests/gem.scm ("gem-recursive-import") ("gem-recursive-import with a specific version"): Remove "ruby-bundler" from the expected packages. Ludovic Courtès 2022-09-17import: gem: Support importing a specific version of a gem....* guix/import/gem.scm: (rubygems-fetch, gem->guix-package) (gem-recursive-import): Fix to fetch the specified version of the gem. * guix/scripts/import/gem.scm (show-help): Update the help message. (guix-import-gem): Modify so the version number to be passed to subsequent procedures. * tests/gem.scm: Add tests. * doc/guix.texi (Invoking guix import): Document. Signed-off-by: Christopher Baines <mail@cbaines.net> Taiju HIGASHI