From dedb17ad010ee9ef67f3f4f3997dd17f226c8090 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 2 May 2015 23:55:24 +0200 Subject: profiles: Store search paths in manifests. Discussed in . * guix/packages.scm (sexp->search-path-specification): New variable. * guix/profiles.scm ()[search-paths]: New field. (package->manifest-entry): Initialize it. (manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...). Emit (search-paths ...). Increment version. (find-package): New procedure. (sexp->manifest)[infer-search-paths]: New procedure. Use it to initialize the 'search-paths' field for versions 0 and 1. Add case for version 2. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Remove. Use 'manifest-entry-search-paths' instead of 'manifest-entry->package' plus 'package-native-search-paths'. * tests/profiles.scm ("profile-manifest, search-paths"): New test. --- guix/packages.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'guix/packages.scm') diff --git a/guix/packages.scm b/guix/packages.scm index a979f31a32..b7a1979a7d 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -56,6 +56,7 @@ search-path-specification search-path-specification? search-path-specification->sexp + sexp->search-path-specification package package? @@ -202,10 +203,24 @@ representation." (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a . The sexp corresponds to the arguments expected by `set-path-environment-variable'." + ;; Note that this sexp format is used both by build systems and in + ;; (guix profiles), so think twice before you change it. (match spec (($ variable files separator type pattern) `(,variable ,files ,separator ,type ,pattern)))) +(define (sexp->search-path-specification sexp) + "Convert SEXP, which is as returned by 'search-path-specification->sexp', to +a object." + (match sexp + ((variable files separator type pattern) + (search-path-specification + (variable variable) + (files files) + (separator separator) + (file-type type) + (file-pattern pattern))))) + (define %supported-systems ;; This is the list of system types that are supported. By default, we ;; expect all packages to build successfully here. -- cgit v1.2.3