about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-11-21 12:37:30 -0600
committerFrederick Muriuki Muriithi2024-11-21 12:37:30 -0600
commita5d92a267d6798f2bb3c2e26a2adedb88b657a9d (patch)
tree6a147b0b81a8859f1c86b438181db4b24bc44727
parent77ae0e7c71b3e975528b71f6374168bd70826cd3 (diff)
downloadgn-libs-a5d92a267d6798f2bb3c2e26a2adedb88b657a9d.tar.gz
Make repository a channel.
-rw-r--r--.guix-channel20
-rw-r--r--.guix/modules/gn-libs.scm42
l---------guix.scm1
3 files changed, 63 insertions, 0 deletions
diff --git a/.guix-channel b/.guix-channel
new file mode 100644
index 0000000..9476e74
--- /dev/null
+++ b/.guix-channel
@@ -0,0 +1,20 @@
+(channel
+ (version 0)
+ (directory ".guix/modules")
+ (dependencies
+  (channel
+   (name guix-bioinformatics)
+   (url "https://git.genenetwork.org/guix-bioinformatics")
+   (branch "master"))
+  ;; FIXME: guix-bioinformatics depends on guix-past. So, there
+  ;; should be no reason to explicitly depend on guix-past. But, the
+  ;; channel does not build otherwise. This is probably a guix bug.
+  (channel
+   (name guix-past)
+   (url "https://gitlab.inria.fr/guix-hpc/guix-past")
+   (introduction
+    (channel-introduction
+     (version 0)
+     (commit "0c119db2ea86a389769f4d2b9c6f5c41c027e336")
+     (signer
+      "3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5"))))))
diff --git a/.guix/modules/gn-libs.scm b/.guix/modules/gn-libs.scm
new file mode 100644
index 0000000..82747b6
--- /dev/null
+++ b/.guix/modules/gn-libs.scm
@@ -0,0 +1,42 @@
+(define-module (gn-libs)
+  #:use-module ((gn packages genenetwork) #:select (gn-libs) #:prefix gn:)
+
+  #:use-module (guix gexp)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix git-download))
+
+(define %source-dir (dirname (dirname (current-source-directory))))
+
+(define vcs-file?
+  (or (git-predicate %source-dir)
+      (const #t)))
+
+(define-public gn-libs
+  (package
+    (inherit gn:gn-libs)
+    (source
+     (local-file "../.."
+		 "gn-libs-checkout"
+		 #:recursive? #t
+		 #:select? vcs-file?))))
+
+(define-public gn-libs-all-tests
+  (package
+    (inherit gn-libs)
+    (arguments
+     (substitute-keyword-arguments (package-arguments gn-libs)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-before 'build 'pylint
+              (lambda _
+                (invoke "pylint" "tests" "gn_libs")))
+            (add-after 'pylint 'mypy
+              (lambda _
+                (invoke "mypy" "--show-erro-codes" ".")))))))
+    (native-inputs
+     (modify-inputs (package-native-inputs gn-libs)
+       (prepend python-mypy)
+       (prepend python-pylint)))))
+
+gn-libs
diff --git a/guix.scm b/guix.scm
new file mode 120000
index 0000000..0376339
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1 @@
+.guix/modules/gn-libs.scm
\ No newline at end of file