diff options
author | Simon Tournier <zimon.toutoune@gmail.com> | 2023-03-11 17:51:10 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-03-13 15:08:32 +0100 |
commit | 9fb8a480d5aec9186908e92ad18b31455f4aab6b (patch) | |
tree | e804749ab2f0c233b363ae4e9e347cbc79456011 /guix | |
parent | d4b2f5eace67b172abd103441fdb7ec2443fb209 (diff) |
packages: Consider 'patches' by 'package-direct-sources'.
* guix/packages.scm (package-direct-sources): Return 'origin' from 'patches'.
* tests/packages.scm: Test it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r-- | guix/packages.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 041a872f9d..7b098e21f0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 jgart <jgart@dismail.de> +;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1239,8 +1240,13 @@ input list." (define (package-direct-sources package) "Return all source origins associated with PACKAGE; including origins in -PACKAGE's inputs." - `(,@(or (and=> (package-source package) list) '()) +PACKAGE's inputs and patches." + (define (expand source) + (cons + source + (filter origin? (origin-patches source)))) + + `(,@(or (and=> (package-source package) expand) '()) ,@(filter-map (match-lambda ((_ (? origin? orig) _ ...) orig) |