summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/transformations.scm4
-rw-r--r--tests/transformations.scm17
2 files changed, 20 insertions, 1 deletions
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 0cad18ba6e6..a9dd18b7e3d 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -356,7 +356,9 @@ a checkout of the Git repository at the given URL."
356 (origin-uri (package-source old)))) 356 (origin-uri (package-source old))))
357 (recursive? (if (or (git-checkout? uri) 357 (recursive? (if (or (git-checkout? uri)
358 (git-reference? uri)) 358 (git-reference? uri))
359 (package-git-url+recursive? old) 359 (let ((_ recursive?
360 (package-git-url+recursive? old)))
361 recursive?)
360 #t))) 362 #t)))
361 (package 363 (package
362 (inherit old) 364 (inherit old)
diff --git a/tests/transformations.scm b/tests/transformations.scm
index 1db54a0e196..82c3d2a5321 100644
--- a/tests/transformations.scm
+++ b/tests/transformations.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016-2017, 2019-2024, 2026 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2016-2017, 2019-2024, 2026 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2021 Marius Bakke <marius@gnu.org> 3;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
4;;; Copyright © 2026 Maxim Cournoyer <maxim@guixotic.coop>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -372,6 +373,22 @@
372 ((("x" dep3)) 373 ((("x" dep3))
373 (map package-source (list dep1 dep3))))))))))) 374 (map package-source (list dep1 dep3)))))))))))
374 375
376(test-equal "options->transformation, with-git-url, recursive? inheritance"
377 (git-checkout (url "https://example2.org")
378 (recursive? #f))
379 (let* ((p (dummy-package "chbouib"
380 (source (origin
381 (method git-fetch)
382 (uri (git-reference
383 (url "https://example1.org")
384 (commit "cabba9e")
385 (recursive? #f)))
386 (sha256 #f)))))
387 (t (options->transformation
388 '((with-git-url . "chbouib=https://example2.org")))))
389 (let ((new (t p)))
390 (package-source new))))
391
375(define* (depends-on-toolchain? p #:optional (toolchain "gcc-toolchain")) 392(define* (depends-on-toolchain? p #:optional (toolchain "gcc-toolchain"))
376 "Return true if P depends on TOOLCHAIN instead of the default tool chain." 393 "Return true if P depends on TOOLCHAIN instead of the default tool chain."
377 (define toolchain-packages 394 (define toolchain-packages