diff options
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 070eb4e9d5..97a82a4682 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -80,6 +80,7 @@ package-transitive-target-inputs package-transitive-native-inputs package-transitive-propagated-inputs + package-transitive-supported-systems package-source-derivation package-derivation package-cross-derivation @@ -537,6 +538,17 @@ for the host system (\"native inputs\"), and not target inputs." recursively." (transitive-inputs (package-propagated-inputs package))) +(define (package-transitive-supported-systems package) + "Return the intersection of the systems supported by PACKAGE and those +supported by its dependencies." + (apply lset-intersection string=? + (package-supported-systems package) + (filter-map (match-lambda + ((label (? package? p) . rest) + (package-supported-systems p)) + (_ #f)) + (package-transitive-inputs package)))) + (define (bag-transitive-inputs bag) "Same as 'package-transitive-inputs', but applied to a bag." (transitive-inputs (append (bag-build-inputs bag) |