about summary refs log tree commit diff
path: root/gn/packages/guile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/packages/guile.scm')
-rw-r--r--gn/packages/guile.scm126
1 files changed, 122 insertions, 4 deletions
diff --git a/gn/packages/guile.scm b/gn/packages/guile.scm
index 3587b00..8341e74 100644
--- a/gn/packages/guile.scm
+++ b/gn/packages/guile.scm
@@ -17,9 +17,10 @@
   #:use-module (gnu packages package-management)
   #:use-module ((gnu packages bash) #:select (bash-minimal))
   #:use-module ((gnu packages bioinformatics) #:select (gemma))
-  #:use-module ((gnu packages certs) #:select (nss-certs))
+  #:use-module ((gnu packages nss) #:select (nss-certs))
+  #:use-module ((gnu packages gnupg) #:select (guile-gcrypt))
   #:use-module ((gnu packages guile) #:select (guile-json-4 guile-3.0 guile-2.2 guile-readline))
-  #:use-module ((gnu packages guile-xyz) #:select (guile-dbi guile-dbd-mysql guile-fibers guile-redis guile-hashing guile-commonmark guile-lmdb guile-lib))
+  #:use-module ((gnu packages guile-xyz) #:select (guile-dbi guile-dbd-mysql guile-fibers guile-redis guile-hashing guile-commonmark guile-lmdb guile-lib guile-uuid))
   #:use-module ((gnu packages parallel) #:select (parallel))
   #:use-module ((gnu packages perl) #:select (perl))
   #:use-module ((gnu packages tls) #:select (guile-gnutls openssl)))
@@ -119,7 +120,7 @@ for MySQL.")
     (license license:gpl2+)))
 
 (define-public gn-guile
-  (let ((commit "169d26710c978484f8e9464a95be6eaa47fa704e")
+  (let ((commit "454244b774ece37f04f146c74353ea4ec35d43e1")
 	(revision "0"))
     (package
       (name "gn-guile")
@@ -132,7 +133,7 @@ for MySQL.")
 		(file-name (string-append name "-" version))
 		(sha256
 		 (base32
-                  "10f6icsg9ifyvmg544xqb1ggzzvd4hdbbni7vhlz9xj5vyf9bih2"))))
+                  "1n1zjpwfksq8bf42d7xr7lnblgsbqc0yszkbid253s943fyxzhfn"))))
       (build-system guile-build-system)
       (native-inputs (list guile-3.0))
       (propagated-inputs
@@ -197,25 +198,40 @@ for MySQL.")
 					   guile-redis
 					   guile-hashing
 					   guile-json-4))
+		       (scm-dev-path
+			(cons*
+			 "./"
+			 (map (lambda (x) (string-append x scm-dir))
+			      guile-inputs)))
 		       (scm-path
 			(map (lambda (x) (string-append x scm-dir))
 			     (cons* out guile-inputs)))
                        (go-dir (string-append "/lib/guile/" effective
                                               "/site-ccache/"))
+		       (go-dev-path
+			(map (lambda (x) (string-append x go-dir))
+			     guile-inputs))
 		       (go-path
 			(map (lambda (x) (string-append x go-dir))
 			     (cons* out guile-inputs))))
 		  (mkdir-p "bin")
 		  (copy-file "gn-guile.sh" "bin/gn-guile")
+		  (copy-file "gn-guile.sh" "bin/gn-guile-dev")
 		  (copy-file "scripts/lmdb-publishdata-export.scm"
 			     "bin/lmdb-publishdata-export")
 		  (substitute* "bin/gn-guile"
 			       (("@SHELL@") bash)
 			       (("guile") guile)
 			       (("web/webserver.scm") webserver))
+		  (substitute* "bin/gn-guile-dev"
+		    (("@SHELL@") bash)
+		    (("guile") guile)
+		    (("web/webserver.scm") "./web/webserver.scm"))
 		  (chmod "bin/gn-guile" #o755)
+		  (chmod "bin/gn-guile-dev" #o755)
 		  (chmod "bin/lmdb-publishdata-export" #o755)
 		  (install-file "bin/gn-guile" bin)
+		  (install-file "bin/gn-guile-dev" bin)
 		  (install-file "bin/lmdb-publishdata-export" bin)
 		  (wrap-script
 		   (string-append out "/bin/gn-guile")
@@ -223,6 +239,12 @@ for MySQL.")
                    `("GUILE_AUTO_COMPILE" ":" = ("0"))
                    `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
                    `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))
+		  (wrap-script
+		   (string-append out "/bin/gn-guile-dev")
+                   `("PATH" ":" prefix ,path)
+                   `("GUILE_AUTO_COMPILE" ":" = ("0"))
+                   `("GUILE_LOAD_PATH" ":" prefix ,scm-dev-path)
+                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-dev-path))
 		  (wrap-program
 		   (string-append out "/bin/lmdb-publishdata-export")
                    `("PATH" ":" prefix ,path)
@@ -233,3 +255,99 @@ for MySQL.")
       (synopsis "Next generation GN code in guile")
       (description "Use of guile.")
       (license license:gpl3))))
+
+(define-public guile-sheepdog
+  (let ((commit "1426617d58f305a4126bb867202843e8cf7dd4b2")
+	(revision "0"))
+    (package
+     (name "guile-sheepdog")
+     (version "0.0.0")
+     (source (origin
+	      (method git-fetch)
+	      (uri (git-reference
+		    (url "https://github.com/BonfaceKilz/guile-sheepdog.git")
+		    (commit commit)))
+	      (file-name (string-append name "-" version))
+	      (sha256
+	       (base32
+                "1z0xzg11p75s2hk312akxlg2h5278w2abma27dhzjf981g3lcqvr"))))
+     (build-system guile-build-system)
+     (native-inputs (list guile-3.0))
+     (propagated-inputs
+      (list bash-minimal guile-3.0 guile-uuid guile-hashing guile-fibers guile-json-4 guile-gcrypt guile-gnutls guile-redis))
+     (arguments
+      (list
+       #:not-compiled-file-regexp "(guix|guix/.*)[.]scm$"
+       #:modules '((srfi srfi-1)
+		   (ice-9 popen)
+		   (guix build guile-build-system)
+		   (guix build utils))
+       #:phases
+       #~(modify-phases %standard-phases
+			(add-before 'build 'remove-conf
+				    (lambda* _
+				      (delete-file "conf.example.scm")))
+			(add-after 'build 'install-script
+				   (lambda* _
+				     (let* ((bash #$(this-package-input "bash-minimal"))
+					    (bash (string-append bash "/bin/bash"))
+					    (guile #$(this-package-input "guile"))
+					    (guile (string-append guile "/bin/guile"))
+					    (build-guile #$(this-package-native-input "guile"))
+					    (build-guile (string-append build-guile "/bin/guile"))
+					    (guile-uuid #$(this-package-input "guile-uuid"))
+					    (guile-gnutls #$(this-package-input "guile-gnutls"))
+					    (guile-hashing #$(this-package-input "guile-hashing"))
+					    (guile-fibers #$(this-package-input "guile-fibers"))
+					    (guile-redis #$(this-package-input "guile-redis"))
+					    (guile-json-4 #$(this-package-input "guile-json"))
+					    (guile-gcrypt #$(this-package-input "guile-gcrypt"))
+					    (guile-lib #$(this-package-input "guile-lib"))
+					    (out #$output)
+					    (bin (string-append out "/bin"))
+					    (effective (read
+							(open-pipe* OPEN_READ
+								    build-guile "-c"
+								    "(write (effective-version))")))
+					    (path (list (string-append guile "/bin")))
+					    (guile-sheepdog (string-append
+							     out
+							     "/share/guile/site/"
+							     effective
+							     "/gn-monitor.scm"))
+					    (scm-dir (string-append "/share/guile/site/" effective))
+					    (guile-inputs (list guile-fibers
+								guile-hashing
+								guile-uuid
+								guile-gnutls
+								guile-gcrypt
+								guile-redis
+								guile-json-4))
+					    (scm-path
+					     (cons*
+					      scm-dir
+					      (map (lambda (x) (string-append x scm-dir))
+						   (cons* out guile-inputs))))
+					    (go-dir (string-append "/lib/guile/" effective
+								   "/site-ccache/"))
+					    (go-path
+					     (map (lambda (x) (string-append x go-dir))
+						  (cons* out guile-inputs))))
+				       (mkdir-p "bin")
+				       (copy-file "sheepdog.sh" "bin/guile-sheepdog")
+				       (substitute* "bin/guile-sheepdog"
+						    (("@SHELL@") bash)
+						    (("guile") guile)
+						    (("gn-monitor.scm") guile-sheepdog))
+				       (chmod "bin/guile-sheepdog" #o755)
+				       (install-file "bin/guile-sheepdog" bin)
+				       (wrap-script
+					(string-append out "/bin/guile-sheepdog")
+					`("PATH" ":" prefix ,path)
+					`("GUILE_AUTO_COMPILE" ":" = ("0"))
+					`("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+					`("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))))))))
+     (home-page "https://github.com/BonfaceKilz/guile-sheepdog.git")
+     (synopsis "Genenetwork monitoring tool")
+     (description "Genenetwork monitoring tool")
+     (license license:gpl3))))