1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- guix pack --version
- storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
- localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
- NIX_STORE_DIR="$storedir"
- GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
- export NIX_STORE_DIR GUIX_DAEMON_SOCKET
- if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
- then
- exit 77
- fi
- the_pack="`guix pack -C none --localstatedir --profile-name=current-guix \
- guile-bootstrap`"
- test_directory="`mktemp -d`"
- trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT
- cd "$test_directory"
- tar -xf "$the_pack"
- profile="`find -name current-guix`"
- test "`readlink $profile`" = "current-guix-1-link"
- test -s "`dirname $profile`/../../../db/db.sqlite"
- test -x ".`guix build guile-bootstrap`/bin/guile"
- cd -
- guile -c "(use-modules (sqlite3) (guix config) (ice-9 match))
- (define db
- (sqlite-open (string-append \"$test_directory\"
- %localstatedir
- \"/guix/db/db.sqlite\")
- SQLITE_OPEN_READONLY))
- (define stmt
- (sqlite-prepare db \"SELECT * FROM ValidPaths;\"))
- (match (sqlite-fold cons '() stmt)
- ((#(ids paths hashes times derivers sizes) ...)
- (exit (member \"`guix build guile-bootstrap`\" paths))))"
|