summaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 27fb918f90..ef97fca86d 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -1592,6 +1592,24 @@
(match (delete-duplicates pythons eq?)
((p) (eq? p (rewrite python))))))
+(test-assert "package-input-rewriting/spec, hidden package"
+ ;; Hidden packages are not subject to rewriting.
+ (let* ((python (hidden-package python))
+ (p0 (dummy-package "chbouib"
+ (build-system trivial-build-system)
+ (inputs (list python))))
+ (rewrite (package-input-rewriting/spec
+ `(("python" . ,(const sed)))
+ #:deep? #t))
+ (p1 (rewrite p0))
+ (bag1 (package->bag p1))
+ (pythons (filter-map (match-lambda
+ (("python" python) python)
+ (_ #f))
+ (bag-transitive-inputs bag1))))
+ (match (delete-duplicates pythons eq?)
+ ((p) (eq? p python)))))
+
(test-equal "package-input-rewriting/spec, graft"
(derivation-file-name (package-derivation %store sed))