guix-commits
[Top][All Lists]
Advanced

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

02/02: services: guix-publish: Add 'compression-level' and 'nar-path' fi


From: Ludovic Courtès
Subject: 02/02: services: guix-publish: Add 'compression-level' and 'nar-path' fields.
Date: Thu, 23 Mar 2017 19:23:40 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 697ddb8850d7aeb612ec9402e86f82c44edf8c96
Author: Ludovic Courtès <address@hidden>
Date:   Thu Mar 23 14:07:00 2017 +0100

    services: guix-publish: Add 'compression-level' and 'nar-path' fields.
    
    * gnu/services/base.scm (<guix-publish-configuration>)[compression-level,
    nar-path]: New fields.
    (guix-publish-shepherd-service): Honor them.
    * doc/guix.texi (Base Services): Document them.
---
 doc/guix.texi         |  9 +++++++++
 gnu/services/base.scm | 12 ++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b452b08..fb08620 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9032,6 +9032,15 @@ The TCP port to listen for connections.
 @item @code{host} (default: @code{"localhost"})
 The host (and thus, network interface) to listen to.  Use
 @code{"0.0.0.0"} to listen on all the network interfaces.
+
address@hidden @code{compression-level} (default: @code{3})
+The gzip compression level at which substitutes are compressed.  Use
address@hidden to disable compression altogether, and @code{9} to get the best
+compression ratio at the expense of increased CPU usage.
+
address@hidden @code{nar-path} (default: @code{"nar"})
+The URL path at which ``nars'' can be fetched.  @xref{Invoking guix
+publish, @code{--nar-path}}, for details.
 @end table
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0de83f3..95a1ba2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -127,6 +127,8 @@
             guix-publish-configuration-guix
             guix-publish-configuration-port
             guix-publish-configuration-host
+            guix-publish-configuration-compression-level
+            guix-publish-configuration-nar-path
             guix-publish-service
             guix-publish-service-type
 
@@ -1438,11 +1440,15 @@ failed to register hydra.gnu.org public key: ~a~%" 
status))))))))
   (port    guix-publish-configuration-port        ;number
            (default 80))
   (host    guix-publish-configuration-host        ;string
-           (default "localhost")))
+           (default "localhost"))
+  (compression-level guix-publish-compression-level ;integer
+                     (default 3))
+  (nar-path    guix-publish-nar-path              ;string
+               (default "nar")))
 
 (define guix-publish-shepherd-service
   (match-lambda
-    (($ <guix-publish-configuration> guix port host)
+    (($ <guix-publish-configuration> guix port host compression nar-path)
      (list (shepherd-service
             (provision '(guix-publish))
             (requirement '(guix-daemon))
@@ -1450,6 +1456,8 @@ failed to register hydra.gnu.org public key: ~a~%" 
status))))))))
                       (list #$(file-append guix "/bin/guix")
                             "publish" "-u" "guix-publish"
                             "-p" #$(number->string port)
+                            "-C" #$(number->string compression)
+                            (string-append "--nar-path=" #$nar-path)
                             (string-append "--listen=" #$host))))
             (stop #~(make-kill-destructor)))))))
 



reply via email to

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