aboutsummaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorSimon Tournier <zimon.toutoune@gmail.com>2023-03-11 17:51:10 +0100
committerLudovic Courtès <ludo@gnu.org>2023-03-13 15:08:32 +0100
commit9fb8a480d5aec9186908e92ad18b31455f4aab6b (patch)
treee804749ab2f0c233b363ae4e9e347cbc79456011 /guix/packages.scm
parentd4b2f5eace67b172abd103441fdb7ec2443fb209 (diff)
downloadguix-9fb8a480d5aec9186908e92ad18b31455f4aab6b.tar
guix-9fb8a480d5aec9186908e92ad18b31455f4aab6b.tar.gz
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/packages.scm')
-rw-r--r--guix/packages.scm10
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)