mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
Add propagated-inputs' and
properties' to <package>.
* guix/packages.scm (<package>)[propagated-inputs, properties]: New fields. (package-derivation): Update `match' clause.
This commit is contained in:
parent
a1e4a93693
commit
062c6927ad
1 changed files with 12 additions and 2 deletions
|
@ -21,6 +21,7 @@ (define-module (guix packages)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix build-system)
|
#:use-module (guix build-system)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
#:export (location
|
#:export (location
|
||||||
location?
|
location?
|
||||||
|
@ -44,6 +45,7 @@ (define-module (guix packages)
|
||||||
package-arguments
|
package-arguments
|
||||||
package-inputs
|
package-inputs
|
||||||
package-native-inputs
|
package-native-inputs
|
||||||
|
package-propagated-inputs
|
||||||
package-outputs
|
package-outputs
|
||||||
package-search-paths
|
package-search-paths
|
||||||
package-description
|
package-description
|
||||||
|
@ -51,6 +53,7 @@ (define-module (guix packages)
|
||||||
package-license
|
package-license
|
||||||
package-platforms
|
package-platforms
|
||||||
package-maintainers
|
package-maintainers
|
||||||
|
package-properties
|
||||||
package-location
|
package-location
|
||||||
|
|
||||||
package-source-derivation
|
package-source-derivation
|
||||||
|
@ -109,10 +112,14 @@ (define-record-type* <package>
|
||||||
(build-system package-build-system) ; build system
|
(build-system package-build-system) ; build system
|
||||||
(arguments package-arguments ; arguments for the build method
|
(arguments package-arguments ; arguments for the build method
|
||||||
(default '()))
|
(default '()))
|
||||||
|
|
||||||
(inputs package-inputs ; input packages or derivations
|
(inputs package-inputs ; input packages or derivations
|
||||||
(default '()))
|
(default '()))
|
||||||
|
(propagated-inputs package-propagated-inputs ; same, but propagated
|
||||||
|
(default '()))
|
||||||
(native-inputs package-native-inputs ; native input packages/derivations
|
(native-inputs package-native-inputs ; native input packages/derivations
|
||||||
(default '()))
|
(default '()))
|
||||||
|
|
||||||
(outputs package-outputs ; list of strings
|
(outputs package-outputs ; list of strings
|
||||||
(default '("out")))
|
(default '("out")))
|
||||||
(search-paths package-search-paths ; list of (ENV-VAR (DIRS ...))
|
(search-paths package-search-paths ; list of (ENV-VAR (DIRS ...))
|
||||||
|
@ -127,6 +134,8 @@ (define-record-type* <package>
|
||||||
(platforms package-platforms (default '()))
|
(platforms package-platforms (default '()))
|
||||||
(maintainers package-maintainers (default '()))
|
(maintainers package-maintainers (default '()))
|
||||||
|
|
||||||
|
(properties package-properties (default '())) ; alist for anything else
|
||||||
|
|
||||||
(location package-location
|
(location package-location
|
||||||
(default (and=> (current-source-location)
|
(default (and=> (current-source-location)
|
||||||
source-properties->location))))
|
source-properties->location))))
|
||||||
|
@ -142,7 +151,7 @@ (define* (package-derivation store package
|
||||||
"Return the derivation of PACKAGE for SYSTEM."
|
"Return the derivation of PACKAGE for SYSTEM."
|
||||||
(match package
|
(match package
|
||||||
(($ <package> name version source (= build-system-builder builder)
|
(($ <package> name version source (= build-system-builder builder)
|
||||||
args inputs native-inputs outputs)
|
args inputs native-inputs propagated-inputs outputs)
|
||||||
;; TODO: For `search-paths', add a builder prologue that calls
|
;; TODO: For `search-paths', add a builder prologue that calls
|
||||||
;; `set-path-environment-variable'.
|
;; `set-path-environment-variable'.
|
||||||
(let ((inputs (map (match-lambda
|
(let ((inputs (map (match-lambda
|
||||||
|
@ -155,7 +164,8 @@ (define* (package-derivation store package
|
||||||
(((? string? name)
|
(((? string? name)
|
||||||
(and (? string?) (? derivation-path?) drv))
|
(and (? string?) (? derivation-path?) drv))
|
||||||
(list name drv)))
|
(list name drv)))
|
||||||
(append native-inputs inputs))))
|
(concatenate (list native-inputs inputs
|
||||||
|
propagated-inputs)))))
|
||||||
(apply builder
|
(apply builder
|
||||||
store (string-append name "-" version)
|
store (string-append name "-" version)
|
||||||
(package-source-derivation store source)
|
(package-source-derivation store source)
|
||||||
|
|
Loading…
Reference in a new issue