about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2026-03-27 11:51:51 +0100
committerPjotr Prins2026-03-27 11:51:51 +0100
commit0a1ae9197b5a4c7dda7d506a3f2589e37b21ee20 (patch)
tree9c5e173ede796b19892bf8a4abe4e844906b8459
parent8eac2913d05022a2fac20ff11511ec15cfc9c0a4 (diff)
downloadgenecup-0a1ae9197b5a4c7dda7d506a3f2589e37b21ee20.tar.gz
Install punkt (guix) as part of the package
-rw-r--r--guix.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/guix.scm b/guix.scm
index a4495a9..6605e9e 100644
--- a/guix.scm
+++ b/guix.scm
@@ -45,6 +45,13 @@
 
 (define %source-dir (dirname (current-filename)))
 
+(define nltk-punkt
+  (origin
+    (method url-fetch)
+    (uri "https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt.zip")
+    (sha256
+     (base32 "1v306rjpjfcqd8mh276lfz8s1d22zgj8n0lfzh5nbbxfjj4hghsi"))))
+
 (define-public python-google-genai
   (package
     (name "python-google-genai")
@@ -112,6 +119,11 @@ access to Gemini models.")
                   (("https.*4.7.0/css/font-awesome.min.css") "/static/font-awesome.min.css")
                   (("https.*jquery-3.2.1.slim.min.js.*\\\">") "/static/jquery.slim.min.js\">")
                   (("https.*1.12.9/umd/popper.min.js.*\\\">") "/static/popper.min.js\">")))))
+          (add-after 'unpack 'install-punkt
+            (lambda* (#:key inputs #:allow-other-keys)
+              (mkdir-p "nlp/tokenizers")
+              (invoke "unzip" #$(this-package-native-input "nltk-punkt")
+                      "-d" "nlp/tokenizers")))
           (add-after 'unpack 'extract-pubmed-archive
             (lambda _
               (invoke "gzip" "-d" "minipubmed.tgz")
@@ -191,6 +203,9 @@ access to Gemini models.")
        ("jquery" ,web-jquery)
        ("js-filesaver" ,js-filesaver-1.3.2)
        ("js-popper" ,js-popper-1.12.9)))
+    (native-inputs
+     `(("nltk-punkt" ,nltk-punkt)
+       ("unzip" ,unzip)))
     (home-page "http://genecup.org")
     (synopsis "GeneCup: gene-addiction relationship search using PubMed")
     (description "GeneCup automatically extracts information from PubMed and