about summary refs log tree commit diff
path: root/gn
diff options
context:
space:
mode:
authorEfraim Flashner2020-06-16 10:01:40 +0300
committerEfraim Flashner2020-06-16 10:08:15 +0300
commitf4c3abf2b8625e73c8aa945c5be1ee3f4b6715be (patch)
treee5a88f5f22f1f79cec171b1c474e1fb41bd47717 /gn
parent6f3f24b04d2d5d59d466ec74535d2257807c078b (diff)
downloadguix-bioinformatics-f4c3abf2b8625e73c8aa945c5be1ee3f4b6715be.tar.gz
containerize rn6-assembly app
Diffstat (limited to 'gn')
-rw-r--r--gn/packages/bioinformatics.scm11
-rw-r--r--gn/services/rn6-assembly-container.scm24
2 files changed, 32 insertions, 3 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index 6ae76ae..fca21a9 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -15,6 +15,7 @@
   #:use-module (guix build-system waf)
   #:use-module (gnu packages)
   #:use-module (gn packages python)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bioconductor)
   #:use-module (gnu packages bioinformatics)
   #:use-module (gnu packages boost)
@@ -672,13 +673,16 @@ different datasets.
                                          "/bin/Rscript"))
                (convert   (string-append (assoc-ref %build-inputs "imagemagick")
                                          "/bin/convert"))
+               (cp        (string-append (assoc-ref %build-inputs "coreutils")
+                                         "/bin/cp"))
                (source    (assoc-ref %build-inputs "source")))
           (copy-recursively source targetdir)
           (substitute* (string-append targetdir "/server.r")
             ;; This version is ideal for deploying with the included PNGs.
-            ;; But we want all of them, so we use a local copy in gn-rshiny's $HOME.
+            ;; But we want all of them, so we use a local copy in shepherd's $HOME.
             ;;(("./pngs") (string-append targetdir "/pngs"))
-            (("./pngs") "/home/gn-rshiny/hchen/rn6app/pngs")
+            (("./pngs") "/home/shepherd/rn6app/pngs")
+            (("cp") cp)
             (("convert") convert))
           (mkdir-p (string-append out "/bin"))
           (call-with-output-file app
@@ -693,7 +697,8 @@ runApp(launch.browser=0, port=4202)~%\n"
           #t))))
    (native-inputs `(("source" ,source)))
    (inputs
-    `(("imagemagick" ,imagemagick)
+    `(("coreutils" ,coreutils-minimal)
+      ("imagemagick" ,imagemagick)
       ("r-min" ,r-minimal)))
    (propagated-inputs
     `(("freetype" ,freetype)
diff --git a/gn/services/rn6-assembly-container.scm b/gn/services/rn6-assembly-container.scm
new file mode 100644
index 0000000..44056c3
--- /dev/null
+++ b/gn/services/rn6-assembly-container.scm
@@ -0,0 +1,24 @@
+(define-module (gn services rn6-assembly-container))
+
+(use-modules (gnu)
+             (gn packages bioinformatics)
+             (gn services rshiny))
+
+(operating-system
+  (host-name "rn6-assembly")
+  (timezone "Etc/UTC")
+  (locale "en_US.utf8")
+
+  (bootloader (bootloader-configuration
+               (bootloader grub-bootloader)
+               (target "does-not-matter")))
+  (file-systems %base-file-systems)
+  ;; No firmware for VMs.
+  (firmware '())
+  ;; We only need a few packages inside the container.
+  (packages '())
+
+  (services (list (service rshiny-service-type
+                           (rshiny-configuration
+                             (package rn6-assembly-error-app)
+                             (binary "rn6-assembly-error-app"))))))