diff options
| author | Pjotr Prins | 2026-03-27 14:05:11 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-27 14:05:11 +0100 |
| commit | 9885f6cc076e74f76c18732324a6894d0c867123 (patch) | |
| tree | 2737eb6688d8d937b4f1476dfe3e4b2386ec7ee1 | |
| parent | 2a2e63676732c15b6251878ebd8260e843c540b2 (diff) | |
| download | genecup-9885f6cc076e74f76c18732324a6894d0c867123.tar.gz | |
Create genecup executable (guix) to run from a shell
| -rw-r--r-- | guix.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix.scm b/guix.scm index 19d2f9e..a124abb 100644 --- a/guix.scm +++ b/guix.scm @@ -226,11 +226,17 @@ access to Gemini models.") (symlink (string-append js-popper "/share/javascript/popper.min.js") (string-append out "/static/popper.min.js"))))) - (add-after 'install 'wrap-executable + (add-after 'install 'create-bin-wrapper (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (path (getenv "GUIX_PYTHONPATH"))) - (wrap-program (string-append out "/server.py") + (mkdir-p (string-append out "/bin")) + (call-with-output-file (string-append out "/bin/genecup") + (lambda (port) + (format port "#!~a~%cd ~a~%exec ~a/server.py \"$@\"~%" + (which "bash") out out))) + (chmod (string-append out "/bin/genecup") #o755) + (wrap-program (string-append out "/bin/genecup") `("PATH" ":" prefix (,(dirname (which "edirect.pl")) ,(dirname (which "dirname")) ,(dirname (which "grep")) |
