Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / tests / profiles.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (test-profiles)
21 #:use-module (guix tests)
22 #:use-module (guix profiles)
23 #:use-module (guix gexp)
24 #:use-module (guix store)
25 #:use-module (guix monads)
26 #:use-module (guix grafts)
27 #:use-module (guix packages)
28 #:use-module (guix derivations)
29 #:use-module (guix build-system trivial)
30 #:use-module (gnu packages bootstrap)
31 #:use-module ((gnu packages base) #:prefix packages:)
32 #:use-module ((gnu packages guile) #:prefix packages:)
33 #:use-module (ice-9 match)
34 #:use-module (ice-9 regex)
35 #:use-module (ice-9 popen)
36 #:use-module (rnrs io ports)
37 #:use-module (srfi srfi-1)
38 #:use-module (srfi srfi-11)
39 #:use-module (srfi srfi-34)
40 #:use-module (srfi srfi-64))
41
42 ;; Test the (guix profiles) module.
43
44 (define %store
45 (open-connection-for-tests))
46
47 ;; Globally disable grafts because they can trigger early builds.
48 (%graft? #f)
49
50 ;; Example manifest entries.
51
52 (define guile-1.8.8
53 (manifest-entry
54 (name "guile")
55 (version "1.8.8")
56 (item "/gnu/store/...")
57 (output "out")))
58
59 (define guile-2.0.9
60 (manifest-entry
61 (name "guile")
62 (version "2.0.9")
63 (item "/gnu/store/...")
64 (output "out")))
65
66 (define guile-2.0.9:debug
67 (manifest-entry (inherit guile-2.0.9)
68 (output "debug")))
69
70 (define glibc
71 (manifest-entry
72 (name "glibc")
73 (version "2.19")
74 (item "/gnu/store/...")
75 (output "out")))
76
77 \f
78 (test-begin "profiles")
79
80 (test-assert "manifest-installed?"
81 (let ((m (manifest (list guile-2.0.9 guile-2.0.9:debug))))
82 (and (manifest-installed? m (manifest-pattern (name "guile")))
83 (manifest-installed? m (manifest-pattern
84 (name "guile") (output "debug")))
85 (manifest-installed? m (manifest-pattern
86 (name "guile") (output "out")
87 (version "2.0.9")))
88 (not (manifest-installed?
89 m (manifest-pattern (name "guile") (version "1.8.8"))))
90 (not (manifest-installed?
91 m (manifest-pattern (name "guile") (output "foobar")))))))
92
93 (test-assert "manifest-matching-entries"
94 (let* ((e (list guile-2.0.9 guile-2.0.9:debug))
95 (m (manifest e)))
96 (and (equal? e
97 (manifest-matching-entries m
98 (list (manifest-pattern
99 (name "guile")
100 (output #f)))))
101 (equal? (list guile-2.0.9)
102 (manifest-matching-entries m
103 (list (manifest-pattern
104 (name "guile")
105 (version "2.0.9"))))))))
106
107 (test-assert "manifest-matching-entries, no match"
108 (let ((m (manifest (list guile-2.0.9)))
109 (p (manifest-pattern (name "python"))))
110 (guard (c ((unmatched-pattern-error? c)
111 (and (eq? p (unmatched-pattern-error-pattern c))
112 (eq? m (unmatched-pattern-error-manifest c)))))
113 (manifest-matching-entries m (list p))
114 #f)))
115
116 (test-assert "manifest-remove"
117 (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug)))
118 (m1 (manifest-remove m0
119 (list (manifest-pattern (name "guile")))))
120 (m2 (manifest-remove m1
121 (list (manifest-pattern (name "guile"))))) ; same
122 (m3 (manifest-remove m2
123 (list (manifest-pattern
124 (name "guile") (output "debug")))))
125 (m4 (manifest-remove m3
126 (list (manifest-pattern (name "guile"))))))
127 (match (manifest-entries m2)
128 ((($ <manifest-entry> "guile" "2.0.9" "debug"))
129 (and (equal? m1 m2)
130 (null? (manifest-entries m3))
131 (null? (manifest-entries m4)))))))
132
133 (test-assert "manifest-add"
134 (let* ((m0 (manifest '()))
135 (m1 (manifest-add m0 (list guile-1.8.8)))
136 (m2 (manifest-add m1 (list guile-2.0.9)))
137 (m3 (manifest-add m2 (list guile-2.0.9:debug)))
138 (m4 (manifest-add m3 (list guile-2.0.9:debug))))
139 (and (match (manifest-entries m1)
140 ((($ <manifest-entry> "guile" "1.8.8" "out")) #t)
141 (_ #f))
142 (match (manifest-entries m2)
143 ((($ <manifest-entry> "guile" "2.0.9" "out")) #t)
144 (_ #f))
145 (equal? m3 m4))))
146
147 (test-equal "manifest-add removes duplicates" ;<https://bugs.gnu.org/30569>
148 (list guile-2.0.9)
149 (manifest-entries (manifest-add (manifest '())
150 (list guile-2.0.9 guile-2.0.9))))
151
152 (test-assert "manifest-perform-transaction"
153 (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug)))
154 (t1 (manifest-transaction
155 (install (list guile-1.8.8))
156 (remove (list (manifest-pattern (name "guile")
157 (output "debug"))))))
158 (t2 (manifest-transaction
159 (remove (list (manifest-pattern (name "guile")
160 (version "2.0.9")
161 (output #f))))))
162 (m1 (manifest-perform-transaction m0 t1))
163 (m2 (manifest-perform-transaction m1 t2))
164 (m3 (manifest-perform-transaction m0 t2)))
165 (and (match (manifest-entries m1)
166 ((($ <manifest-entry> "guile" "1.8.8" "out")) #t)
167 (_ #f))
168 (equal? m1 m2)
169 (null? (manifest-entries m3)))))
170
171 (test-assert "manifest-transaction-effects"
172 (let* ((m0 (manifest (list guile-1.8.8)))
173 (t (manifest-transaction
174 (install (list guile-2.0.9 glibc)))))
175 (let-values (((remove install upgrade downgrade)
176 (manifest-transaction-effects m0 t)))
177 (and (null? remove) (null? downgrade)
178 (equal? (list glibc) install)
179 (equal? (list (cons guile-1.8.8 guile-2.0.9)) upgrade)))))
180
181 (test-assert "manifest-transaction-effects and downgrades"
182 (let* ((m0 (manifest (list guile-2.0.9)))
183 (t (manifest-transaction (install (list guile-1.8.8)))))
184 (let-values (((remove install upgrade downgrade)
185 (manifest-transaction-effects m0 t)))
186 (and (null? remove) (null? install) (null? upgrade)
187 (equal? (list (cons guile-2.0.9 guile-1.8.8)) downgrade)))))
188
189 (test-assert "manifest-transaction-effects and pseudo-upgrades"
190 (let* ((m0 (manifest (list guile-2.0.9)))
191 (t (manifest-transaction (install (list guile-2.0.9)))))
192 (let-values (((remove install upgrade downgrade)
193 (manifest-transaction-effects m0 t)))
194 (and (null? remove) (null? install) (null? downgrade)
195 (equal? (list (cons guile-2.0.9 guile-2.0.9)) upgrade)))))
196
197 (test-assert "manifest-transaction-null?"
198 (manifest-transaction-null? (manifest-transaction)))
199
200 (test-assert "manifest-transaction-removal-candidate?"
201 (let ((m (manifest (list guile-2.0.9)))
202 (t (manifest-transaction
203 (remove (list (manifest-pattern (name "guile")))))))
204 (and (manifest-transaction-removal-candidate? guile-2.0.9 t)
205 (not (manifest-transaction-removal-candidate? glibc t)))))
206
207 (test-assertm "profile-derivation"
208 (mlet* %store-monad
209 ((entry -> (package->manifest-entry %bootstrap-guile))
210 (guile (package->derivation %bootstrap-guile))
211 (drv (profile-derivation (manifest (list entry))
212 #:hooks '()
213 #:locales? #f))
214 (profile -> (derivation->output-path drv))
215 (bindir -> (string-append profile "/bin"))
216 (_ (built-derivations (list drv))))
217 (return (and (file-exists? (string-append bindir "/guile"))
218 (string=? (dirname (readlink bindir))
219 (derivation->output-path guile))))))
220
221 (test-assertm "profile-derivation relative symlinks, one entry"
222 (mlet* %store-monad
223 ((entry -> (package->manifest-entry %bootstrap-guile))
224 (guile (package->derivation %bootstrap-guile))
225 (drv (profile-derivation (manifest (list entry))
226 #:relative-symlinks? #t
227 #:hooks '()
228 #:locales? #f))
229 (profile -> (derivation->output-path drv))
230 (bindir -> (string-append profile "/bin"))
231 (_ (built-derivations (list drv))))
232 (return (and (file-exists? (string-append bindir "/guile"))
233 (string=? (readlink bindir)
234 (string-append "../"
235 (basename
236 (derivation->output-path guile))
237 "/bin"))))))
238
239 (unless (network-reachable?) (test-skip 1))
240 (test-assertm "profile-derivation relative symlinks, two entries"
241 (mlet* %store-monad
242 ((manifest -> (packages->manifest
243 (list %bootstrap-guile gnu-make-for-tests)))
244 (guile (package->derivation %bootstrap-guile))
245 (make (package->derivation gnu-make-for-tests))
246 (drv (profile-derivation manifest
247 #:relative-symlinks? #t
248 #:hooks '()
249 #:locales? #f))
250 (profile -> (derivation->output-path drv))
251 (bindir -> (string-append profile "/bin"))
252 (_ (built-derivations (list drv))))
253 (return (and (file-exists? (string-append bindir "/guile"))
254 (file-exists? (string-append bindir "/make"))
255 (string=? (readlink (string-append bindir "/guile"))
256 (string-append "../../"
257 (basename
258 (derivation->output-path guile))
259 "/bin/guile"))
260 (string=? (readlink (string-append bindir "/make"))
261 (string-append "../../"
262 (basename
263 (derivation->output-path make))
264 "/bin/make"))))))
265
266 (test-assertm "profile-derivation, inputs"
267 (mlet* %store-monad
268 ((entry -> (package->manifest-entry packages:glibc "debug"))
269 (drv (profile-derivation (manifest (list entry))
270 #:hooks '()
271 #:locales? #f)))
272 (return (derivation-inputs drv))))
273
274 (test-assertm "profile-derivation, cross-compilation"
275 (mlet* %store-monad
276 ((manifest -> (packages->manifest (list packages:sed packages:grep)))
277 (target -> "arm-linux-gnueabihf")
278 (grep (package->cross-derivation packages:grep target))
279 (sed (package->cross-derivation packages:sed target))
280 (locales (package->derivation packages:glibc-utf8-locales))
281 (drv (profile-derivation manifest
282 #:hooks '()
283 #:locales? #t
284 #:target target)))
285 (define (find-input package)
286 (let ((name (string-append (package-full-name package "-") ".drv")))
287 (any (lambda (input)
288 (let ((input (derivation-input-path input)))
289 (and (string-suffix? name input) input)))
290 (derivation-inputs drv))))
291
292 ;; The inputs for grep and sed should be cross-build derivations, but that
293 ;; for the glibc-utf8-locales should be a native build.
294 (return (and (string=? (derivation-system drv) (%current-system))
295 (string=? (find-input packages:grep)
296 (derivation-file-name grep))
297 (string=? (find-input packages:sed)
298 (derivation-file-name sed))
299 (string=? (find-input packages:glibc-utf8-locales)
300 (derivation-file-name locales))))))
301
302 (test-assert "package->manifest-entry defaults to \"out\""
303 (let ((outputs (package-outputs packages:glibc)))
304 (equal? (manifest-entry-output
305 (package->manifest-entry (package
306 (inherit packages:glibc)
307 (outputs (reverse outputs)))))
308 (manifest-entry-output
309 (package->manifest-entry packages:glibc))
310 "out")))
311
312 (test-assertm "profile-manifest, search-paths"
313 (mlet* %store-monad
314 ((guile -> (package
315 (inherit %bootstrap-guile)
316 (native-search-paths
317 (package-native-search-paths packages:guile-2.0))))
318 (entry -> (package->manifest-entry guile))
319 (drv (profile-derivation (manifest (list entry))
320 #:hooks '()
321 #:locales? #f))
322 (profile -> (derivation->output-path drv)))
323 (mbegin %store-monad
324 (built-derivations (list drv))
325
326 ;; Read the manifest back and make sure search paths are preserved.
327 (let ((manifest (profile-manifest profile)))
328 (match (manifest-entries manifest)
329 ((result)
330 (return (equal? (manifest-entry-search-paths result)
331 (manifest-entry-search-paths entry)
332 (package-native-search-paths
333 packages:guile-2.0)))))))))
334
335 (test-assert "package->manifest-entry, search paths"
336 ;; See <http://bugs.gnu.org/22073>.
337 (let ((mpl (@ (gnu packages python-xyz) python2-matplotlib)))
338 (lset= eq?
339 (package-transitive-native-search-paths mpl)
340 (manifest-entry-search-paths
341 (package->manifest-entry mpl)))))
342
343 (test-equal "packages->manifest, propagated inputs"
344 (map (match-lambda
345 ((label package)
346 (list (package-name package) (package-version package)
347 package)))
348 (package-propagated-inputs packages:guile-2.2))
349 (map (lambda (entry)
350 (list (manifest-entry-name entry)
351 (manifest-entry-version entry)
352 (manifest-entry-item entry)))
353 (manifest-entry-dependencies
354 (package->manifest-entry packages:guile-2.2))))
355
356 (test-assert "manifest-entry-parent"
357 (let ((entry (package->manifest-entry packages:guile-2.2)))
358 (match (manifest-entry-dependencies entry)
359 ((dependencies ..1)
360 (and (every (lambda (parent)
361 (eq? entry (force parent)))
362 (map manifest-entry-parent dependencies))
363 (not (force (manifest-entry-parent entry))))))))
364
365 (test-assertm "read-manifest"
366 (mlet* %store-monad ((manifest -> (packages->manifest
367 (list (package
368 (inherit %bootstrap-guile)
369 (native-search-paths
370 (package-native-search-paths
371 packages:guile-2.0))))))
372 (drv (profile-derivation manifest
373 #:hooks '()
374 #:locales? #f))
375 (out -> (derivation->output-path drv)))
376 (define (entry->sexp entry)
377 (list (manifest-entry-name entry)
378 (manifest-entry-version entry)
379 (manifest-entry-search-paths entry)
380 (manifest-entry-dependencies entry)
381 (force (manifest-entry-parent entry))))
382
383 (mbegin %store-monad
384 (built-derivations (list drv))
385 (let ((manifest2 (profile-manifest out)))
386 (return (equal? (map entry->sexp (manifest-entries manifest))
387 (map entry->sexp (manifest-entries manifest2))))))))
388
389 (test-equal "collision"
390 '(("guile-bootstrap" "2.0") ("guile-bootstrap" "42"))
391 (guard (c ((profile-collision-error? c)
392 (let ((entry1 (profile-collision-error-entry c))
393 (entry2 (profile-collision-error-conflict c)))
394 (list (list (manifest-entry-name entry1)
395 (manifest-entry-version entry1))
396 (list (manifest-entry-name entry2)
397 (manifest-entry-version entry2))))))
398 (run-with-store %store
399 (mlet* %store-monad ((p0 -> (package
400 (inherit %bootstrap-guile)
401 (version "42")))
402 (p1 -> (dummy-package "p1"
403 (propagated-inputs `(("p0" ,p0)))))
404 (manifest -> (packages->manifest
405 (list %bootstrap-guile p1)))
406 (drv (profile-derivation manifest
407 #:hooks '()
408 #:locales? #f)))
409 (return #f)))))
410
411 (test-equal "collision of propagated inputs"
412 '(("guile-bootstrap" "2.0") ("guile-bootstrap" "42"))
413 (guard (c ((profile-collision-error? c)
414 (let ((entry1 (profile-collision-error-entry c))
415 (entry2 (profile-collision-error-conflict c)))
416 (list (list (manifest-entry-name entry1)
417 (manifest-entry-version entry1))
418 (list (manifest-entry-name entry2)
419 (manifest-entry-version entry2))))))
420 (run-with-store %store
421 (mlet* %store-monad ((p0 -> (package
422 (inherit %bootstrap-guile)
423 (version "42")))
424 (p1 -> (dummy-package "p1"
425 (propagated-inputs
426 `(("guile" ,%bootstrap-guile)))))
427 (p2 -> (dummy-package "p2"
428 (propagated-inputs
429 `(("guile" ,p0)))))
430 (manifest -> (packages->manifest (list p1 p2)))
431 (drv (profile-derivation manifest
432 #:hooks '()
433 #:locales? #f)))
434 (return #f)))))
435
436 (test-assertm "no collision"
437 ;; Here we have an entry that is "lowered" (its 'item' field is a store file
438 ;; name) and another entry (its 'item' field is a package) that is
439 ;; equivalent.
440 (mlet* %store-monad ((p -> (dummy-package "p"
441 (propagated-inputs
442 `(("guile" ,%bootstrap-guile)))))
443 (guile (package->derivation %bootstrap-guile))
444 (entry -> (manifest-entry
445 (inherit (package->manifest-entry
446 %bootstrap-guile))
447 (item (derivation->output-path guile))))
448 (manifest -> (manifest
449 (list entry
450 (package->manifest-entry p))))
451 (drv (profile-derivation manifest)))
452 (return (->bool drv))))
453
454 (test-assertm "etc/profile"
455 ;; Make sure we get an 'etc/profile' file that at least defines $PATH.
456 (mlet* %store-monad
457 ((guile -> (package
458 (inherit %bootstrap-guile)
459 (native-search-paths
460 (package-native-search-paths packages:guile-2.0))))
461 (entry -> (package->manifest-entry guile))
462 (drv (profile-derivation (manifest (list entry))
463 #:hooks '()
464 #:locales? #f))
465 (profile -> (derivation->output-path drv)))
466 (mbegin %store-monad
467 (built-derivations (list drv))
468 (let* ((pipe (open-input-pipe
469 (string-append "unset GUIX_PROFILE; "
470 ;; 'source' is a Bashism; use '.' (dot).
471 ". " profile "/etc/profile; "
472 ;; Don't try to parse set(1) output because
473 ;; it differs among shells; just use echo.
474 "echo $PATH")))
475 (path (get-string-all pipe)))
476 (return
477 (and (zero? (close-pipe pipe))
478 (string-contains path (string-append profile "/bin"))))))))
479
480 (test-assertm "etc/profile when etc/ already exists"
481 ;; Here 'union-build' makes the profile's etc/ a symlink to the package's
482 ;; etc/ directory, which makes it read-only. Make sure the profile build
483 ;; handles that.
484 (mlet* %store-monad
485 ((thing -> (dummy-package "dummy"
486 (build-system trivial-build-system)
487 (arguments
488 `(#:guile ,%bootstrap-guile
489 #:builder
490 (let ((out (assoc-ref %outputs "out")))
491 (mkdir out)
492 (mkdir (string-append out "/etc"))
493 (call-with-output-file (string-append out "/etc/foo")
494 (lambda (port)
495 (display "foo!" port)))
496 #t)))))
497 (entry -> (package->manifest-entry thing))
498 (drv (profile-derivation (manifest (list entry))
499 #:hooks '()
500 #:locales? #f))
501 (profile -> (derivation->output-path drv)))
502 (mbegin %store-monad
503 (built-derivations (list drv))
504 (return (and (file-exists? (string-append profile "/etc/profile"))
505 (string=? (call-with-input-file
506 (string-append profile "/etc/foo")
507 get-string-all)
508 "foo!"))))))
509
510 (test-assertm "etc/profile when etc/ is a symlink"
511 ;; When etc/ is a symlink, the unsymlink code in 0.8.2 would fail
512 ;; gracelessly because 'scandir' would return #f.
513 (mlet* %store-monad
514 ((thing -> (dummy-package "dummy"
515 (build-system trivial-build-system)
516 (arguments
517 `(#:guile ,%bootstrap-guile
518 #:builder
519 (let ((out (assoc-ref %outputs "out")))
520 (mkdir out)
521 (mkdir (string-append out "/foo"))
522 (symlink "foo" (string-append out "/etc"))
523 (call-with-output-file (string-append out "/etc/bar")
524 (lambda (port)
525 (display "foo!" port)))
526 #t)))))
527 (entry -> (package->manifest-entry thing))
528 (drv (profile-derivation (manifest (list entry))
529 #:hooks '()
530 #:locales? #f))
531 (profile -> (derivation->output-path drv)))
532 (mbegin %store-monad
533 (built-derivations (list drv))
534 (return (and (file-exists? (string-append profile "/etc/profile"))
535 (string=? (call-with-input-file
536 (string-append profile "/etc/bar")
537 get-string-all)
538 "foo!"))))))
539
540 (test-assertm "profile-derivation when etc/ is a relative symlink"
541 ;; See <https://bugs.gnu.org/32686>.
542 (mlet* %store-monad
543 ((etc (gexp->derivation
544 "etc"
545 #~(begin
546 (mkdir #$output)
547 (call-with-output-file (string-append #$output "/foo")
548 (lambda (port)
549 (display "Heya!" port))))))
550 (thing -> (dummy-package "dummy"
551 (build-system trivial-build-system)
552 (inputs
553 `(("etc" ,etc)))
554 (arguments
555 `(#:guile ,%bootstrap-guile
556 #:builder
557 (let ((out (assoc-ref %outputs "out"))
558 (etc (assoc-ref %build-inputs "etc")))
559 (mkdir out)
560 (symlink etc (string-append out "/etc"))
561 #t)))))
562 (entry -> (package->manifest-entry thing))
563 (drv (profile-derivation (manifest (list entry))
564 #:relative-symlinks? #t
565 #:hooks '()
566 #:locales? #f))
567 (profile -> (derivation->output-path drv)))
568 (mbegin %store-monad
569 (built-derivations (list drv))
570 (return (string=? (call-with-input-file
571 (string-append profile "/etc/foo")
572 get-string-all)
573 "Heya!")))))
574
575 (test-equalm "union vs. dangling symlink" ;<https://bugs.gnu.org/26949>
576 "does-not-exist"
577 (mlet* %store-monad
578 ((thing1 -> (dummy-package "dummy"
579 (build-system trivial-build-system)
580 (arguments
581 `(#:guile ,%bootstrap-guile
582 #:builder
583 (let ((out (assoc-ref %outputs "out")))
584 (mkdir out)
585 (symlink "does-not-exist"
586 (string-append out "/dangling"))
587 #t)))))
588 (thing2 -> (package (inherit thing1) (name "dummy2")))
589 (drv (profile-derivation (packages->manifest
590 (list thing1 thing2))
591 #:hooks '()
592 #:locales? #f))
593 (profile -> (derivation->output-path drv)))
594 (mbegin %store-monad
595 (built-derivations (list drv))
596 (return (readlink (readlink (string-append profile "/dangling")))))))
597
598 (test-equalm "profile in profile"
599 '("foo" "0")
600
601 ;; Make sure we can build a profile that has another profile has one of its
602 ;; entries. The new profile's /manifest and /etc/profile must override the
603 ;; other's.
604 (mlet* %store-monad
605 ((prof0 (profile-derivation
606 (manifest
607 (list (package->manifest-entry %bootstrap-guile)))
608 #:hooks '()
609 #:locales? #f))
610 (prof1 (profile-derivation
611 (manifest (list (manifest-entry
612 (name "foo")
613 (version "0")
614 (item prof0))))
615 #:hooks '()
616 #:locales? #f)))
617 (mbegin %store-monad
618 (built-derivations (list prof1))
619 (let ((out (derivation->output-path prof1)))
620 (return (and (file-exists?
621 (string-append out "/bin/guile"))
622 (let ((manifest (profile-manifest out)))
623 (match (manifest-entries manifest)
624 ((entry)
625 (list (manifest-entry-name entry)
626 (manifest-entry-version entry)))))))))))
627
628 (test-end "profiles")
629
630 ;;; Local Variables:
631 ;;; eval: (put 'dummy-package 'scheme-indent-function 1)
632 ;;; End: