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")
n class='msg-avail'>...* gnu/packages/patches/emacs-next-native-comp-driver-options.patch: Add file. * gnu/packages/patches/emacs-next-exec-path.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register them here. * gnu/packages/emacs.scm (emacs-next-minimal)[origin](patches): Include the same patches as emacs-minimal, save for the variants specific to emacs-next introduced above. Co-Authored-By: Nicolas Graves <ngraves@ngraves.fr> Fixes: ‘emacs-next’ is almost unusable <https://bugs.gnu.org/66227> Liliana Marie Prikler 2023-09-09gnu: Add emacs-next-tree-sitter....This package currently exists on master, where both emacs and emacs-next are built without tree-sitter. Since most of our Emacsen now build with tree-sitter, it is no longer needed, but let's issue a warning rather than a hard error to those who rely on it. * gnu/packages/emacs.scm (emacs-next-tree-sitter): New variable. Liliana Marie Prikler 2023-09-09gnu: Add emacs-next-pgtk-xwidgets....* gnu/packages/emacs.scm (emacs-next-pgtk-xwidgets): New variable. Liliana Marie Prikler 2023-09-09gnu: Add emacs-next-pgtk....* gnu/packages/emacs.scm (emacs-next-pgtk): New variable. Liliana Marie Prikler 2023-09-09gnu: Add emacs-next....* gnu/packages/emacs.scm (emacs->emacs-next, emacs-next): New variable. Liliana Marie Prikler 2023-09-09gnu: Add emacs-next-minimal....* gnu/packages/emacs.scm (emacs-next-minimal): New variable. Liliana Marie Prikler 2023-09-07gnu: emacs: Reload subdirs.el files in ‘guix-emacs-autoload-packages’....This fixes a regression introduced with 79cfe30f3 ("build-system: emacs: Use subdirectories again.") which caused the 'guix-emacs-autoload-packages' to no longer be able to autoload all packages. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Reload subdirs.el files unless NO-RELOAD is provided. Update docstring. * doc/guix.texi (Application Setup): Document that ‘guix-emacs-autoload-packages’ can be invoked interactively to auto-reload newly installed Emacs packages. * gnu/packages/emacs.scm (emacs)[arguments]<#:phases>: Call guix-emacs-autoload-packages with an argument in the site-start.el file. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Maxim Cournoyer 2023-08-02gnu: emacs: Update to 29.1....* gnu/packages/emacs.scm (emacs-minimal): Update to 29.1. [source]: Use url-fetch again. Liliana Marie Prikler 2023-08-01Merge branch 'master' into emacs-teamLiliana Marie Prikler 2023-07-18gnu: emacs: Depend on libc-for-target....* gnu/packages/emacs.scm (emacs)[inputs]: Change glibc to (libc-for-target). Janneke Nieuwenhuizen 2023-07-13Merge branch 'master' into emacs-teamLiliana Marie Prikler 2023-07-10gnu: emacs-next: Update to 29.0.92....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.92. Signed-off-by: Andrew Tropin <andrew@trop.in> Hilton Chain 2023-06-09gnu: Construct Emacs packages from bottom up....This makes relationships within the Emacs variants slightly easier to reason about. In particular, it makes it so that inputs get added on top of the previous stack rather than removed (which brings the risk of not adjusting changes downwards). * gnu/packages/emacs.scm (emacs-minimal): Expand package definition. [inputs]: Reorder and add bash-minimal. (emacs-no-x): Inherit from emacs-minimal. (emacs): Inherit from emacs-no-x. (emacs-motif, emacs-no-x-toolkit): Inherit from emacs-no-x. Only inherit inputs from emacs. Liliana Marie Prikler 2023-06-09gnu: Make emacs-next-tree-sitter the new emacs....* gnu/packages/patches/emacs-source-date-epoch.patch: Delete file * gnu/local.mk (dist_patch_DATA): Remove it from here. * gnu/packages/emacs.scm (emacs): Update to 29.0.91. [source]<patches>: Remove “emacs-source-date-epoch.patch”. Add “emacs-pgtk-super-key-fix.patch”. [arguments]: Use “--with-native-compilation=aot” instead of #:make-flags. [inputs]: Add sqlite and tree-sitter. (emacs-next-pgtk): Rename to… (emacs-pgtk): … this. (emacs-next-pgtk-xwidgets): Rename to… (emacs-pgtk-xwidgets): … this. (emacs-minimal)[native-inputs]: Add texinfo. (emacs-xwidgets): Inherit build system, configure-flags and phases normally. (emacs-next, emacs-next-tree-sitter): Remove variables. Liliana Marie Prikler 2023-05-28gnu: emacs-next-tree-sitter: "Downgrade" to 29.0.91....* gnu/packages/emacs.scm (emacs-next-tree-sitter)[version, source]: Inherit fields from emacs-next. Liliana Marie Prikler 2023-05-28gnu: emacs-next: Update to 29.0.91....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.91. Liliana Marie Prikler 2023-05-07gnu: Add emacs-next-pgtk-xwidgets....* gnu/packages/emacs.scm (emacs-next-pgtk-xwidgets): New variable. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Antero Mejr 2023-04-30gnu: emacs: Use librsvg-for-system....* gnu/packages/emacs.scm (emacs)[inputs]: Replace librsvg input logic with librsvg-for-system. Efraim Flashner 2023-04-19gnu: emacs-next: Update to 29.0.90....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.90. Liliana Marie Prikler 2023-03-20Merge remote-tracking branch 'origin/master' into core-updatesAndreas Enge 2023-03-17gnu: m17n-lib: Fix cross-compile....* gnu/packages/emacs.scm (m17n-lib) [source]: Add m17n-lib-1.8.0-use-pkg-config-for-freetype.patch. [native-inputs]: When cross-compile add pkg-config, libtool, gettext-minimal, autoconf, automake. [arguments]: When cross-compile, add phase to fix rpl_malloc undefined references. * gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Z572 2023-03-17gnu: m17n-db: Fix cross-compile....* gnu/packages/emacs.scm (m17n-db) [inputs]: Move gettext-minimal to ... [native-inputs]: ... here. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Z572 2023-03-12gnu: emacs-next-pgtk: Inherit from emacs-next-tree-sitter....Inherit pgtk emacs from tree-sitter to have both features available for wayland users. For more details: https://yhetil.org/guix-devel/87r0txr99u.fsf@inventati.org/T/#u * gnu/packages/emacs.scm (emacs-next-pgtk): Inherit from emacs-next-tree-sitter. Andrew Tropin 2023-03-12gnu: emacs-next-tree-sitter: Inherit from emacs-next....Make tree-sitter emacs available without pgtk. It's part of ongoing iheritance hierarchy update, tree-sitter have less implications than pgtk and thus it should be placed earlier in inheritance chain. For more details: https://yhetil.org/guix-devel/87r0txr99u.fsf@inventati.org/T/#u * gnu/packages/emacs.scm (emacs-next-tree-sitter): Inherit from emacs-next. Andrew Tropin 2023-03-09gnu: emacs-next-tree-sitter: Inherit from emacs-next-pgtk....Make emacs with tree-sitter work on wayland as well. * gnu/packages/emacs.scm (emacs-next-tree-sitter): Inherit from emacs-next-pgtk, remove uneeded native-inputs, add synopsis and description. [source]: Use inherited patches. Andrew Tropin 2023-03-09gnu: emacs-next-pgtk: Remove xwidgets support....xwidgets is beefy and buggy, but emacs-next-pgtk is important for wayland users, so it seems a good idea to remove xwidgets from emacs-next-pgtk. Also, we have a separate emacs-xwidgets package for those who wants to experiment. * gnu/packages/emacs.scm (emacs-next-pgtk)[propagated-inputs]: Remove gsettings-desktop-schemas glib-networking. [arguments]<#:configure-flags>: Remove --with-xwidgets. [inputs]: Remove webkitgtk-with-libsoup2. [home-page]: PGTK is merged to upstream emacs repository now, so inherit home-page from emacs-next. Andrew Tropin 2023-03-02Merge remote-tracking branch 'savannah/master' into core-updates...Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm Christopher Baines 2023-03-01gnu: Add emacs-motif....* gnu/packages/text-editors.scm (emacs-motif): New variable. Signed-off-by: Christopher Baines <mail@cbaines.net> Andy Tai 2023-02-26gnu: emacs-next: Update to 29.0.60-1.f1f571e....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.60-1.f1f571e. Liliana Marie Prikler 2023-02-26gnu: Add emacs-next-tree-sitter....* gnu/packages/emacs.scm (emacs-next-tree-sitter): New variable. (emacs-next): Remove tree sitter support. Liliana Marie Prikler 2023-02-12gnu: Remove tree-sitter comment from emacs.scm imports....* gnu/packages/emacs.scm: Remove tree-sitter comment. Signed-off-by: Andrew Tropin <andrew@trop.in> Pierre Langlois 2023-02-11gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support....gnu/packages/emacs.scm (emacs)[native-search-paths]: Add a search-path for tree-sitter grammars. gnu/packages/aux-files/emacs/guix-emacs.el: Add directories from TREE_SITTER_GRAMMAR_PATH to treesit-extra-load-path. Andrew Tropin 2023-02-09gnu: tree-sitter: Move to its own module....* gnu/packages/text-editors.scm (tree-sitter): Move to ... * gnu/packages/tree-sitter.scm: ... here, a new module. * gnu/packages/vim.scm: Use (gnu packages tree-sitter). * gnu/packages/emacs.scm: Use (gnu packages tree-sitter). * gnu/local.mk (GNU_SYSTEM_MODULES): Register tree-sitter.scm new module. Signed-off-by: Andrew Tropin <andrew@trop.in> Pierre Langlois 2023-02-04gnu: emacs-next: Enable tree-sitter support....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.60-0.ac7ec87. * gnu/packages/emacs.scm (emacs-next)[inputs]: Add tree-sitter. Signed-off-by: Andrew Tropin <andrew@trop.in> Declan Tsien 2023-01-30Merge remote-tracking branch 'origin/master' into core-updates... Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm Efraim Flashner 2023-01-26gnu: emacs-next: Update to 29.0.50-4.6adc193....* gnu/packages/emacs.scm (emacs-next): Update to 29.0.50-4.6adc193. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fredrik Salomonsson 2023-01-22gnu: emacs-minimal: Do not patch compilation driver....The ‘patch-compilation-driver’ phase pulls in libgccjit even though it has been deliberately removed from emacs-minimal. * gnu/packages/emacs.scm (emacs)[#:phases]: Delete ‘patch-compilation-driver’. Liliana Marie Prikler