guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: pack: Add "none" compressor.


From: Ricardo Wurmus
Subject: 01/01: pack: Add "none" compressor.
Date: Sat, 19 Aug 2017 12:01:31 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit af735661f3829390c8e43f83873068b86509526b
Author: Ricardo Wurmus <address@hidden>
Date:   Sat Aug 19 17:56:28 2017 +0200

    pack: Add "none" compressor.
    
    * guix/scripts/pack.scm (%compressors): Add compressor "none"; prepend
    extension with ".".
    (self-contained-tarball, docker-image): Assume compressor extensions start
    with period.
    * doc/guix.texi (Invoking guix pack): Document it.
---
 doc/guix.texi         |  2 +-
 guix/scripts/pack.scm | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 8160643..bff0788 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2630,7 +2630,7 @@ configuration triplets,, autoconf, Autoconf}).
 @item address@hidden
 @itemx -C @var{tool}
 Compress the resulting tarball using @var{tool}---one of @code{gzip},
address@hidden, @code{xz}, or @code{lzip}.
address@hidden, @code{xz}, @code{lzip}, or @code{none} for no compression.
 
 @item address@hidden
 @itemx -S @var{spec}
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 1273c09..c269a1f 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2017 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2017 Efraim Flashner <address@hidden>
+;;; Copyright © 2017 Ricardo Wurmus <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,19 +51,20 @@
   (compressor name extension command)
   compressor?
   (name       compressor-name)      ;string (e.g., "gzip")
-  (extension  compressor-extension) ;string (e.g., "lz")
+  (extension  compressor-extension) ;string (e.g., ".lz")
   (command    compressor-command))  ;gexp (e.g., #~("/gnu/store/…/gzip" "-9n"))
 
 (define %compressors
   ;; Available compression tools.
-  (list (compressor "gzip"  "gz"
+  (list (compressor "gzip"  ".gz"
                     #~(#+(file-append gzip "/bin/gzip") "-9n"))
-        (compressor "lzip"  "lz"
+        (compressor "lzip"  ".lz"
                     #~(#+(file-append lzip "/bin/lzip") "-9"))
-        (compressor "xz"    "xz"
+        (compressor "xz"    ".xz"
                     #~(#+(file-append xz "/bin/xz") "-e -T0"))
-        (compressor "bzip2" "bz2"
-                    #~(#+(file-append bzip2 "/bin/bzip2") "-9"))))
+        (compressor "bzip2" ".bz2"
+                    #~(#+(file-append bzip2 "/bin/bzip2") "-9"))
+        (compressor "none" "" #f)))
 
 (define (lookup-compressor name)
   "Return the compressor object called NAME.  Error out if it could not be
@@ -180,7 +182,7 @@ added to the pack."
                                           (_ #f))
                                         directives)))))))))
 
-  (gexp->derivation (string-append name ".tar."
+  (gexp->derivation (string-append name ".tar"
                                    (compressor-extension compressor))
                     build
                     #:references-graphs `(("profile" ,profile))))
@@ -245,7 +247,7 @@ the image."
                               #:compressor '#$(compressor-command compressor)
                               #:creation-time (make-time time-utc 0 1)))))
 
-  (gexp->derivation (string-append name ".tar."
+  (gexp->derivation (string-append name ".tar"
                                    (compressor-extension compressor))
                     build
                     #:references-graphs `(("profile" ,profile))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]