;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa ;;; ;;; 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 (test-elpa) #:use-module (guix import elpa) #:use-module (guix tests) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) (define elpa-mock-archive '(1 (ace-window . [(0 9 0) ((avy (0 2 0))) "Quickly switch windows." single ((:url . "https://github.com/abo-abo/ace-window") (:keywords "window" "location"))]) (auctex . [(11 88 6) nil "Integrated environment for *TeX*" tar ((:url . "http://www.gnu.org/software/auctex/"))]))) (define auctex-readme-mock "This is the AUCTeX description.") (define* (elpa-package-info-mock name #:optional (repo "gnu")) "Simulate retrieval of 'archive-contents' file from REPO and extraction of information about package NAME. (Function 'elpa-package-info'.)" (let* ((archive elpa-mock-archive) (info (filter (lambda (p) (eq? (first p) (string->symbol name))) (cdr archive)))) (if (pair? info) (first info) #f))) (define elpa-version->string (@@ (guix import elpa) elpa-version->string;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org> ;;; ;;; 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 <http://www.gnu.org/licenses/>. (define-module (gnu system nss) #:use-module (rnrs enums) #:use-module (guix records) #:use-module (srfi srfi-9) #:use-module (ice-9 match) #:export (name-service-switch? name-service-switch name-service? name-service lookup-specification %default-nss %mdns-host-lookup-nss %files %compat %dns name-service-switch->string)) ;;; Commentary: ;;; ;;; Bindings for libc's name service switch (NSS) configuration. ;;; ;;; Code: (define-record-type* <name-service> name-service make-name-service name-service? (name name-service-name) (reaction name-service-reaction (default (lookup-specification)))) ;; Lookup specification (info "(libc) Actions in the NSS Configuration"). (define-enumeration lookup-action (return continue) make-lookup-action) (define-enumeration lookup-status (success not-found u