nonguix/nonguix/modules.scm
Jonathan Brielmaier 62a5df4222
*.scm: Use SPDX license identifiers.
Fixes https://gitlab.com/nonguix/nonguix/-/issues/224

* *.scm: Use SPDX license identifier and remove obsolete license
statement.
2022-12-19 17:17:39 +01:00

23 lines
792 B
Scheme

;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
(define-module (nonguix modules)
#:use-module (ice-9 match)
#:export (import-nonguix-module?))
(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)))
;; 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)))))