2022-12-19 17:17:39 +01:00
|
|
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
2020-01-08 23:27:45 +01:00
|
|
|
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
|
|
|
|
|
|
|
|
(define-module (nonguix modules)
|
|
|
|
#:use-module (ice-9 match)
|
2020-12-18 22:20:23 +01:00
|
|
|
#:export (import-nonguix-module?))
|
2020-01-08 23:27:45 +01:00
|
|
|
|
|
|
|
(define (nonguix-module-name? name)
|
|
|
|
"Return true if NAME (a list of symbols) denotes a Guix or Nonguix module."
|
|
|
|
(match name
|
|
|
|
(('guix _ ...) #t)
|
|
|
|
(('gnu _ ...) #t)
|
|
|
|
(('nonguix _ ...) #t)
|
|
|
|
(('nongnu _ ...) #t)
|
|
|
|
(_ #f)))
|
2020-12-18 22:20:23 +01:00
|
|
|
|
|
|
|
;; Since we don't use deduplication support in 'populate-store', don't
|
|
|
|
;; import (guix store deduplication) and its dependencies, which
|
|
|
|
;; includes Guile-Gcrypt.
|
|
|
|
(define (import-nonguix-module? module)
|
|
|
|
"Return true if MODULE is not (guix store deduplication)"
|
|
|
|
(and (nonguix-module-name? module)
|
|
|
|
(not (equal? module '(guix store deduplication)))))
|