aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 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 (test-discovery)
  #:use-module (guix discovery)
  #:use-module (guix build-system)
  #:use-module (guix utils)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))

(define %top-srcdir
  (dirname (search-path %load-path "guix.scm")))

(test-begin "discovery")

(test-assert "scheme-modules"
  (match (map module-name (scheme-modules %top-srcdir "guix/import"))
    ((('guix 'import _ ...) ..1)
     #t)))

(test-assert "scheme-modules recurses in symlinks to directories"
  (call-with-temporary-directory
   (lambda (directory)
     (mkdir (string-append directory "/guix"))
     (symlink (string-append %top-srcdir "/guix/import")
              (string-append directory "/guix/import"))

     ;; DIRECTORY/guix/import is a symlink but we want to make sure
     ;; 'scheme-modules' recurses into it.
     (match (map module-name (scheme-modules directory))
       ((('guix 'import _ ...) ..1)
        #t)))))

(test-equal "scheme-modules, non-existent directory"
  '()
  (scheme-modules "/does/not/exist"))

(test-assert "all-modules"
  (match (map module-name
              (all-modules `((,%top-srcdir . "guix/build-system"))))
    ((('guix 'build-system names) ..1)
     names)))

(test-assert "fold-module-public-variables"
  (let ((modules (all-modules `((,%top-srcdir . "guix/build-system")))))
    (match (fold-module-public-variables (lambda (obj result)
                                           (if (build-system? obj)
                                               (cons obj result)
                                               result))
                                         '()
                                         modules)
      (((? build-system? bs) ..1)
       bs))))

(test-end "discovery")
iac)[native-inputs]: * gnu/packages/chez.scm (chez-sockets)[native-inputs]: * gnu/packages/engineering.scm (fastcap)[native-inputs]: * gnu/packages/gettext.scm (po4a)[native-inputs]: * gnu/packages/maths.scm (cddlib)[native-inputs]: (gnuplot)[native-inputs]: (itpp)[native-inputs]: * gnu/packages/ocaml.scm (unison)[native-inputs]: * gnu/packages/pdf.scm (extractpdfmark)[native-inputs]: * gnu/packages/photo.scm (enblend-enfuse): Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG. * gnu/packages/radio.scm (gnuradio)[native-inputs]: Remove unnecessary TEXLIVE-TINY. * gnu/packages/tex.scm (texlive-tiny): Deprecate it in favor of TEXLIVE-SCHEME-BASIC. (texlive-makecmds)[native-inputs]: Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG. * guix/lint.scm (check-inputs-should-be-native): Check only for "texlive-updmap.cfg" input name. Nicolas Goaziou 2023-07-18gnu: Rationalize texlive-updmap.cfg and texlive-tiny inputs....TEXLIVE-UPDMAP.CFG and TEXLIVE-TINY should only be used as native inputs. Also remove texlive packages already provided by them. * doc/build.scm (pdf-manual): * gnu/packages/algebra.scm (pari-gp): * gnu/packages/bioinformatics.scm (discrover): (phyml): (velvet): * gnu/packages/chemistry.scm (yaehmop): * gnu/packages/chez.scm (stex-bootstrap): (chez-web): (chez-sockets): * gnu/packages/cran.scm (r-prereg): * gnu/packages/docbook.scm (dblatex): * gnu/packages/emacs-xyz.scm (emacs-auctex): * gnu/packages/engineering.scm (fastcap): * gnu/packages/fsf.scm (book-faif): * gnu/packages/graphviz.scm (dot2tex): * gnu/packages/maths.scm (hypre): * gnu/packages/ocaml.scm (unison): (ocaml-bibtex2html): * gnu/packages/plotutils.scm (asymptote): * gnu/packages/python-xyz.scm (python-nbconvert): (python-pypandoc): * gnu/packages/radio.scm (gnuradio): (libosmo-dsp): * gnu/packages/statistics.scm (r-with-tests): * gnu/packages/tex.scm (texlive-makecmds): (texlive-innerscript): (teximpatient): (texlive-xkeyval): Remove texlive packages already provided by TEXLIVE-UPDMAP.CFG. Don't add TEXLIVE-TINY or TEXLIVE-UPDMAP.CFG as inputs. Nicolas Goaziou 2023-07-18gnu: ocaml-bibtex2html: Improve package style....* gnu/packages/ocaml.scm (ocaml-bibtex2html)[origin]<uri>: Re-use version. [arguments]: Use G-expressions. Remove trailing #T from phases. [native-inputs]: Remove labels. Nicolas Goaziou 2023-07-18gnu: ocaml-bibtex2html: Fix build....* gnu/packages/ocaml.scm (ocaml-bibtex2html)[native-inputs]: Add TEXLIVE-INFWARERR, TEXLIVE-KVOPTINOS, TEXLIVE-PDFTEXCMDS. Nicolas Goaziou 2023-07-18gnu: texlive-fonts-ec -> texlive-ec....* gnu/packages/tex.scm (texlive-ec): New variable. (texlive-fonts-ec): Deprecate variable. (lyx): (biber): * gnu/packages/python-xyz.scm (python-pypandoc): * gnu/packages/statistics.scm (r-with-tests): * doc/build.scm (pdf-manual): * gnu/packages/bioinformatics.scm (discrover): (phyml): (velvet): * gnu/packages/chemistry.scm (yaehmop): * gnu/packages/chez.scm (stex-bootstrap): * gnu/packages/ocaml.scm (unison): (ocaml-bibtex2html): * gnu/packages/plotutils.scm (asymptote): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-dvips-l3backend -> texlive-l3backend....* gnu/packages/tex.scm (texlive-dvips-l3backend): Deprecate package. * gnu/packages/chez.scm (stex-bootstrap): * gnu/packages/maths.scm (cddlib): * gnu/packages/ocaml.scm (unison): * gnu/packages/plotutils.scm (asymptote): Use new name. Nicolas Goaziou 2023-06-02gnu: Add ocaml-pyml....* gnu/packages/ocaml.ml (ocaml-pyml): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-06-02gnu: Add ocaml-stdcompat....* gnu/packages/ocaml.scm (ocaml-stdcompat): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-06-02gnu: Add ocaml-parmap....* gnu/packages/ocaml.scm (ocaml-parmap): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-04-25gnu: ocaml-lwt: Add ocaml4.07 variant....* gnu/packages/ocaml.scm (ocaml-lwt)[properties]: New field. (ocaml4.07-lwt): New variable. Efraim Flashner 2023-04-14Merge branch 'master' into core-updates....Conflicts: gnu/local.mk gnu/packages/build-tools.scm gnu/packages/certs.scm gnu/packages/check.scm gnu/packages/compression.scm gnu/packages/cups.scm gnu/packages/fontutils.scm gnu/packages/gnuzilla.scm gnu/packages/guile.scm gnu/packages/ibus.scm gnu/packages/image-processing.scm gnu/packages/linux.scm gnu/packages/music.scm gnu/packages/nss.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/qt.scm gnu/packages/ruby.scm gnu/packages/shells.scm gnu/packages/tex.scm gnu/packages/video.scm gnu/packages/vulkan.scm gnu/packages/web.scm gnu/packages/webkit.scm gnu/packages/wm.scm Maxim Cournoyer 2023-04-12gnu: ocaml-mdx: Fix tests....* gnu/packages/ocaml.scm (ocaml-mdx)[arguments]: Substitue obsolete 'egrep' by 'grep -E'. Signed-off-by: Julien Lepiller <julien@lepiller.eu> Simon Tournier 2023-04-12gnu: ocaml-ppxlib: Fix tests....* gnu/packages/ocaml.scm (ocaml-ppxlib)[arguments]: Substitue obsolete 'egrep' by 'grep -E'. Signed-off-by: Julien Lepiller <julien@lepiller.eu> Simon Tournier 2023-03-27gnu: hevea: Update to 2.36....* gnu/packages/ocaml.scm (hevea): Update to 2.36. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Philippe SWARTVAGHER 2023-03-20Merge remote-tracking branch 'origin/master' into core-updatesAndreas Enge