aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index a623628447..1d901505aa 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2024 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>
@@ -1628,6 +1628,21 @@
(match (delete-duplicates pythons eq?)
((p) (eq? p python)))))
+(test-assert "package-input-rewriting/spec, replace hidden package"
+ ;; Rewrite hidden packages when requested.
+ (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)))
+ #:replace-hidden? #t))
+ (p1 (rewrite p0)))
+ (match (package-inputs p1)
+ ((("python" python))
+ (and (string=? (package-full-name python)
+ (package-full-name sed)))))))
+
(test-equal "package-input-rewriting/spec, graft"
(derivation-file-name (package-derivation %store sed))
@@ -2036,6 +2051,14 @@
(dummy-package "a"
(arguments (this-package-native-input "hello")))))
+(test-equal "this-package-input, origin"
+ "http://example.org/foo.tar.gz"
+ (origin-uri
+ (package-arguments
+ (dummy-package "a"
+ (inputs (list (dummy-origin (uri "http://example.org/foo.tar.gz"))))
+ (arguments (this-package-input "foo.tar.gz"))))))
+
(test-eq "modify-inputs, replace"
coreutils
;; Replace an input; notice that the label in unchanged.