aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015-2016, 2018, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; 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 packages dico)
  #:use-module (guix packages)
  #:use-module ((guix licenses) #:select (gpl3+))
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages crypto)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages m4)
  #:use-module (gnu packages groff)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages python)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages gsasl)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages wordnet))

(define-public dico
  (package
    (name "dico")
    (version "2.11")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/dico/dico-"
                                  version ".tar.xz"))
              (sha256
               (base32
                "0nic4mggc0yhms130k7x4qp5k9c42fwg6n8hmk5cmynh6gi9h7xc"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags (list (string-append "--with-guile-site-dir=" %output
                                              "/share/guile/site/2.0")
                               "--disable-static")
       #:make-flags '("V=1")
       #:phases (modify-phases %standard-phases
                  (add-before 'check 'silence-guile
                    (lambda _
                      ;; Guile is too talkative, which disturbs the test
                      ;; infrastructure.  Gag it.
                      (setenv "GUILE_AUTO_COMPILE" "0")
                      (setenv "GUILE_WARN_DEPRECATED" "no")))
                  (replace 'check
                    (lambda _
                      ;; Test '71: append + dooffs + env' fails if $V is not 2.
                      (invoke "make" "check" "V=2"))))))
    (native-inputs (list groff))
    (inputs
     (list m4                           ;used at run time
           pcre
           python-wrapper
           guile-2.2
           gsasl
           readline
           zlib
           wordnet
           libxcrypt                              ;for 'crypt'
           libltdl))
    (home-page "https://www.gnu.org/software/dico/")
    (synopsis "Implementation of DICT server (RFC 2229)")
    (description
     "GNU Dico implements a flexible dictionary server and client according to
RFC 2229 (DICT Server).  It is able to access any database available,
regardless of format, thanks to its modular structure.  New modules may be
written in C, Guile or Python.  Dico also includes a command-line client,
which may be used to query remote dictionary databases.")
    (license gpl3+)))
'/guix/commit/tests?id=0e510971c3f6e5203803f14c40b89fe37d3d3f53'>derivations: Add test in keep-going mode.Ludovic Courtès * tests/derivations.scm ("derivation fails but keep going"): New test. 2016-01-18derivations: Add test for #:leaked-env-vars.Ludovic Courtès * tests/derivations.scm ("derivation #:leaked-env-vars"): New test. 2016-01-06utils: Add 'ensure-keyword-arguments'.Ludovic Courtès * guix/utils.scm (delkw, ensure-keyword-arguments): New procedures. * tests/utils.scm ("ensure-keyword-arguments"): New test. 2016-01-05guix package: Allow multiple '--search' flags.Ludovic Courtès * guix/scripts/package.scm (find-packages-by-description): Change 'rx' parameter to 'regexps'. [matches-all?, matches-one?]: New procedures. Use them. (process-query): Collect regexps from all 'search' queries, and pass them to 'find-packages-by-description'. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Document it. 2016-01-02graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.Ludovic Courtès Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile). 2016-01-02graph: %BAG-EMERGED-NODE-TYPE filters out origins.Ludovic Courtès Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da. 2015-12-30guix build: Augment %PATCH-PATH when -L is passed.Ludovic Courtès Fixes <http://bugs.gnu.org/22259>. Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>. * guix/scripts/build.scm (%standard-build-options) <-L>: Augment %PATCH-PATH. * tests/guix-package.sh: Add test. 2015-12-20profiles: Honor search paths of propagated inputs.Ludovic Courtès Fixes <http://bugs.gnu.org/22073>. Reported by Federico Beffa <beffa@ieee.org>. * guix/profiles.scm (package->manifest-entry): Use 'package-transitive-native-search-paths' when computing 'search-paths' field. * tests/profiles.scm ("package->manifest-entry, search paths"): New test. 2015-12-20packages: Add 'package-transitive-native-search-paths'.Ludovic Courtès * guix/packages.scm (package-transitive-native-search-paths): New procedure. * tests/packages.scm ("package-transitive-native-search-paths"): New test. 2015-12-14gexp: 'local-file' resolves relative file names.Ludovic Courtès * guix/gexp.scm (<local-file>): Rename constructor to '%%local-file'. Add 'absolute' field. (%local-file, extract-directory, absolute-file-name): New procedures. (current-source-directory): New macro. (local-file): Adjust call to '%local-file'. (local-file-absolute-file-name): New procedure. (local-file-compiler): Force the 'absolute' field. * tests/guix-system.sh: Test whether 'local-file' canonicalization works. * doc/guix.texi (G-Expressions): Adjust. 2015-12-13graph: Add synthetic test.Ludovic Courtès * tests/graph.scm ("node-transitive-edges, no duplicates"): New test. 2015-12-11import: cran: Parse DESCRIPTION instead of HTML.Ricardo Wurmus * guix/import/cran.scm (description->alist, listify, beautify-description, description->package): New procedures. (table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove proceduces. (latest-release): Use parsed DESCRIPTION instead of SXML. * tests/cran.scm: Rewrite to match importer. 2015-12-09derivations: Determine what's built in 'check' mode.Ludovic Courtès * guix/derivations.scm (substitution-oracle): Add #:mode parameter and honor it. (derivation-prerequisites-to-build): Likewise. [derivation-built?]: Take it into account. * guix/ui.scm (show-what-to-build): Add #:mode parameter. Pass it to 'substitute-oracle' and 'derivations-prerequisites-to-build'. * tests/derivations.scm ("derivation-prerequisites-to-build in 'check' mode"): New test. 2015-12-08store: Allow clients to request multiple builds.Ludovic Courtès * guix/store.scm (set-build-options): Add #:rounds parameter and honor it. * tests/store.scm ("build multiple times"): New test. 2015-12-07gnu-maintenance: Add tests for 'release-file?'.Ludovic Courtès * tests/gnu-maintenance.scm: New file. * Makefile.am (SCM_TESTS): Add it. * guix/gnu-maintenance.scm (release-file?): Export. 2015-12-03store: Add mode parameter to 'build-paths'.Ludovic Courtès * guix/store.scm (%protocol-version): Set minor to 15. (build-mode): New enumerate type. (build-things): Add 'mode' parameter; pass it to the RPC. * tests/store.scm ("build-things, check mode"): New check. 2015-11-28lint: Do not report already-patched vulnerabilities.Ludovic Courtès * guix/scripts/lint.scm (patch-file-name): New procedure. (check-vulnerabilities): Use it to filter out patched vulnerabilities. * tests/lint.scm ("cve: one patched vulnerability"): New test. 2015-11-26lint: Add "cve" checker.Ludovic Courtès Fixes <http://bugs.gnu.org/21289>. * guix/scripts/lint.scm (package-name->cpe-name, package-vulnerabilities) (check-vulnerabilities): New procedures. * guix/scripts/lint.scm (%checkers): Add "cve" checker. * tests/lint.scm ("cve", "cve: one vulnerability"): New tests. * doc/guix.texi (Invoking guix lint): Mention it. 2015-11-26Add (guix cve).Ludovic Courtès * guix/cve.scm, tests/cve-sample.xml, tests/cve.scm: New files. * Makefile.am (MODULES): Add guix/cve.scm. (SCM_TESTS): Add tests/cve.scm. (EXTRA_DIST): Add tests/cve-sample.scm. 2015-11-26import: hackage: Add new tests.Federico Beffa * tests/hackage.scm (eval-test-with-cabal): Add optional argument. (test-cabal-3): New variable and test. (test-read-cabal-1): Exercise more parsing variants. 2015-11-26utils: Add 'canonical-newline-port'.Federico Beffa * guix/utils.scm (canonical-newline-port): New procedure. * tests/utils.scm ("canonical-newline-port"): New test. 2015-11-24services: dmd: Error out upon unmet dmd requirements.Ludovic Courtès * gnu/services/dmd.scm (assert-no-duplicates): Rename to... (assert-valid-graph): ... this. [provisions]: New variable. [assert-satisfied-requirements]: New procedure. Use it. * tests/guix-system.sh: Add test with unmet dmd requirements. 2015-11-23graph: Add '%bag-with-origins-node-type'.Ludovic Courtès * guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. 2015-11-23guix download: Fail when more than one URL is passed.Ludovic Courtès * guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test. 2015-11-21environment: Correctly handle abnormal exits.Ludovic Courtès Fixes <http://bugs.gnu.org/21958>. * guix/scripts/environment.scm (status->exit-code): New procedure. (exit/status, primitive-exit/status): Use it. * tests/guix-environment-container.sh: Add test. 2015-11-21tests: Skip 'guix-container-environment.sh' when support is missing.Ludovic Courtès Fixes <http://bugs.gnu.org/21410>. Reported by Alex Vong <alexvong1995@gmail.com>. * tests/guix-environment-container.sh: Exit with 77 when '((@@ (guix scripts environment) assert-container-features))' fails. 2015-11-21graph: Add procedures to query a node's edges.Ludovic Courtès * guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests. 2015-11-21Add (guix graph).Ludovic Courtès * guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it. 2015-11-11guix gc: Error out when extra arguments are passed.Ludovic Courtès Fixes <http://bugs.gnu.org/21817>. Reported by Petter Berntsen <petter@mykolab.ch>. * guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New procedure. Use it for actions 'collect-garbage', 'optimize', and 'verify'. * tests/guix-gc.sh: Add tests. 2015-11-11guix package: '--search-paths' can report combined search paths.Ludovic Courtès Partly fixes <http://bugs.gnu.org/20255>. * guix/scripts/package.scm (search-path-environment-variables): Change 'profile' to 'profiles'; expect it to be a list. (display-search-paths): Likewise. (%default-options): Remove 'profile' entry. (%options) <--profile>: Keep previous values associated with 'profile' in RESULT. (guix-package)[process-actions, process-query]: Handle the possible lack of 'profile' pair in OPTS. 2015-11-04tests: Use the canonical current directory name.Ludovic Courtès * tests/guix-environment-container.sh (current_dir): New variable. Use it when grepping "mounts". 2015-11-04tests: Skip 'program-file' test when shebang is too long.Ludovic Courtès * tests/gexp.scm ("program-file"): Skip when SHEBANG is too long. 2015-11-03import: pypi: Use "pypi-uri" instead of building the URL manually.Cyril Roelandt * guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri". * tests/pypi.scm: Update the tests accordingly. 2015-11-03build: container: Add feature test predicates.David Thompson * gnu/build/linux-container.scm (user-namespace-supported?, unprivileged-user-namespace-supported?, setgroups-supported?): New procedures. * tests/container.scm: Use predicates. * tests/syscalls.scm: Likewise. 2015-11-02tests: Set 'SHELL' for 'guix environment'.Ludovic Courtès * tests/guix-environment.sh: Export 'SHELL'. 2015-11-01tests: Make sure the daemon dumps directory entries deterministically.Ludovic Courtès * tests/store.scm ("write-file & export-path yield the same result"): New test. 2015-10-30scripts: environment: Allow lists of packages in expressions.David Thompson * guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs. 2015-10-29scripts: environment: Allow mixing regular and ad-hoc packages.David Thompson This patch changes the --ad-hoc flag to be positional. That is, the packages that appear before --ad-hoc are interpreted as packages whose inputs should be in the environment; the packages that appear after are interpreted as packages to be directly added to the environment. * guix/scripts/environment.scm (tag-package-arg, compact): New procedures. (%options): Tweak the handlers for --load and --expression options. (options/resolve-packages): Preserve package mode tag. (parse-args): Tweak argument handler to use package tagging procedure. (guix-environment): Apply ad-hoc behavior on a per package basis. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Document new behavior of --ad-hoc. 2015-10-28tests: Print the mounts visible in the container.Ludovic Courtès * tests/guix-environment-container.sh: Print the content of $tmpdir/mounts. 2015-10-28scripts: build: Add --file option.David Thompson * guix/scripts/build.scm (show-help): Add help text for --file option. (%options): Add --file option. (options/resolve-packages): Handle 'file' options. * tests/guix-build.sh: Add tests. * doc/guix.texi ("invoking guix build"): Add doc. 2015-10-28substitute: Honor all the specified server URLs.Ludovic Courtès * guix/scripts/substitute.scm (lookup-narinfos/diverse): New procedure. (lookup-narinfo): Use it. (process-query): Change #:cache-url to #:cache-urls. [valid?]: Remove 'narinfo?' check, which is no longer necessary. Use 'lookup-narinfos/diverse' instead of 'lookup-narinfos'. (process-substitution): Change #:cache-url to #:cache-urls. (%cache-url): Rename to... (%cache-urls): ... this. Turn into a list. (guix-substitute): Remove 'getaddrinfo' test with early exit. Adjust calls to 'process-query' and 'process-substitution'. * tests/substitute.scm: Change '%cache-url' to '%cache-urls'. 2015-10-25scripts: environment: Add --container option.David Thompson * guix/scripts/system.scm (specification->file-system-mapping): Move from here... * guix/ui.scm (specification->file-system-mapping): ... to here. * guix/scripts/enviroment.scm (show-help): Show help for new options. (%options): Add --container --network, --expose, and --share options. (%network-configuration-files): New variable. (launch-environment, launch-environment/container, requisites*, inputs->requisites): New procedures. (guix-environment): Spawn new process in a container when requested. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment-container.sh: New file. * Makefile.am (SH_TESTS): Add it. 2015-10-20Add 'guix challenge'.Ludovic Courtès * guix/scripts/challenge.scm, tests/challenge.scm: New files. * Makefile.am (MODULES): Add the former. (SCM_TESTS): Add the latter. * doc.am (SUBCOMMANDS): Add 'challenge'. * doc/guix.texi (Substitutes): Add xref to 'guix challenge'. (Invoking guix challenge): New node. * doc/contributing.texi (Submitting Patches): Add note about using 'guix challenge'. * po/guix/POTFILES.in: Add guix/scripts/challenge.scm. 2015-10-19guix archive: Add '--extract'.Ludovic Courtès * guix/scripts/archive.scm (show-help, %options): Add --extract. (guix-archive): Honor it. * tests/guix-archive.sh: Test it. * doc/guix.texi (Invoking guix archive): Document it. 2015-10-14services: Add 'dmd-service-back-edges'.Ludovic Courtès * gnu/services/dmd.scm (dmd-service-back-edges): New procedure. * tests/services.scm ("dmd-service-back-edges"): New test.