diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-05-02 23:55:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-02 23:57:11 +0200 |
commit | dedb17ad010ee9ef67f3f4f3997dd17f226c8090 (patch) | |
tree | f83cc692eaf5e3ae952fa9626b1fcef1755a2d84 /tests | |
parent | b9212a5455304661d1e969ced5df63aa9b6b761f (diff) | |
download | patches-dedb17ad010ee9ef67f3f4f3997dd17f226c8090.tar patches-dedb17ad010ee9ef67f3f4f3997dd17f226c8090.tar.gz |
profiles: Store search paths in manifests.
Discussed in <http://bugs.gnu.org/20255>.
* guix/packages.scm (sexp->search-path-specification): New variable.
* guix/profiles.scm (<manifest-entry>)[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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/profiles.scm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 54fbaea864..890f09a751 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -26,6 +26,7 @@ #:use-module (guix derivations) #:use-module (gnu packages bootstrap) #:use-module ((gnu packages base) #:prefix packages:) + #:use-module ((gnu packages guile) #:prefix packages:) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-11) @@ -198,6 +199,27 @@ #:hooks '()))) (return (derivation-inputs drv)))) +(test-assertm "profile-manifest, search-paths" + (mlet* %store-monad + ((guile -> (package + (inherit %bootstrap-guile) + (native-search-paths + (package-native-search-paths packages:guile-2.0)))) + (entry -> (package->manifest-entry guile)) + (drv (profile-derivation (manifest (list entry)) + #:hooks '())) + (profile -> (derivation->output-path drv))) + (mbegin %store-monad + (built-derivations (list drv)) + + ;; Read the manifest back and make sure search paths are preserved. + (let ((manifest (profile-manifest profile))) + (match (manifest-entries manifest) + ((result) + (return (equal? (manifest-entry-search-paths result) + (manifest-entry-search-paths entry) + (package-native-search-paths + packages:guile-2.0))))))))) (test-end "profiles") |