diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-12-07 18:26:11 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-12-07 18:26:11 +0100 |
commit | 9e111db4535b3cd5729e37294ae51d95240334b4 (patch) | |
tree | cc90a9de80ff39bd93426b763918d904abfeeb56 /guix/packages.scm | |
parent | 92b61d3e1bb50f0c1d087bc8d57cc00c3ce360df (diff) | |
parent | cf69135d5e6797e566b8bb18419ae9e3c8aeb621 (diff) | |
download | gnu-guix-9e111db4535b3cd5729e37294ae51d95240334b4.tar gnu-guix-9e111db4535b3cd5729e37294ae51d95240334b4.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index d3f3cf0fdd..9571565e17 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -997,14 +997,18 @@ and return it." "Fold PROC over the packages BAG depends on. Each package is visited only once, in depth-first order. If NATIVE? is true, restrict to native dependencies; otherwise, restrict to target dependencies." + (define bag-direct-inputs* + (if native? + (lambda (bag) + (append (bag-build-inputs bag) + (bag-target-inputs bag) + (if (bag-target bag) + '() + (bag-host-inputs bag)))) + bag-host-inputs)) + (define nodes - (match (if native? - (append (bag-build-inputs bag) - (bag-target-inputs bag) - (if (bag-target bag) - '() - (bag-host-inputs bag))) - (bag-host-inputs bag)) + (match (bag-direct-inputs* bag) (((labels things _ ...) ...) things))) @@ -1017,7 +1021,7 @@ dependencies; otherwise, restrict to target dependencies." (((? package? head) . tail) (if (set-contains? visited head) (loop tail result visited) - (let ((inputs (bag-direct-inputs (package->bag head)))) + (let ((inputs (bag-direct-inputs* (package->bag head)))) (loop (match inputs (((labels things _ ...) ...) (append things tail))) |