Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / tests / pack.scm
index de9ef8e..c57c684 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define %gzip-compressor
   ;; Compressor that uses the bootstrap 'gzip'.
   ((@ (guix scripts pack) compressor) "gzip"
-   %bootstrap-coreutils&co "gz" '("gzip" "-6n")))
+   "gz"
+   #~(#+(file-append %bootstrap-coreutils&co "/bin/gzip") "-6n")))
 
 (define %tar-bootstrap %bootstrap-coreutils&co)
 
 \f
 (test-begin "pack")
 
+;; FIXME: The following test would rebuild the world (and likely fail) as a
+;; consequence of commit c45477d2a1a651485feede20fe0f3d15aec48b39 (and related
+;; changes) that made guile-sqlite3 a dependency of the derivation.
+;; See <https://bugs.gnu.org/32184>.
+(test-skip 1)
+
 (test-assertm "self-contained-tarball"
   (mlet* %store-monad
       ((profile (profile-derivation (packages->manifest
                                         #:symlinks '(("/bin/Guile"
                                                       -> "bin/guile"))
                                         #:compressor %gzip-compressor
-                                        #:tar %tar-bootstrap))
+                                        #:archiver %tar-bootstrap))
        (check   (gexp->derivation
                  "check-tarball"
-                 #~(let ((guile (string-append "." #$profile "/bin")))
+                 #~(let ((bin (string-append "." #$profile "/bin")))
                      (setenv "PATH"
                              (string-append #$%tar-bootstrap "/bin"))
                      (system* "tar" "xvf" #$tarball)
                      (mkdir #$output)
                      (exit
-                      (and (file-exists? (string-append guile "/guile"))
+                      (and (file-exists? (string-append bin "/guile"))
                            (string=? (string-append #$%bootstrap-guile "/bin")
-                                     (readlink guile))
-                           (string=? (string-append (string-drop guile 1)
-                                                    "/guile")
+                                     (readlink bin))
+                           (string=? (string-append ".." #$profile
+                                                    "/bin/guile")
                                      (readlink "bin/Guile"))))))))
     (built-derivations (list check))))