~ruther/ruthless-guix

ref: 315db53cf17de715449f705767ab9830ad3df971 ruthless-guix/modules/ruther/packages/node.scm -rw-r--r-- 4.4 KiB
315db53c — Rutherther feat: add codex-acp 10 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
(define-module (ruther packages node)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (nonguix build-system binary)
  #:use-module (nonguix utils)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix build-system node)
  #:use-module (gnu packages base)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages node-xyz)
  #:use-module (gnu packages tls)
  #:use-module (guix download))

(define-public node-anthropic-ai-claude-code-1.0.72
  (package
    (name "claude-code")
    (version "2.1.9")
    (source
     (origin
       (method url-fetch)
       (uri
        (string-append "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-" version ".tgz"))
       (sha256
        (base32 "0l3r2s64dvcwhnvfw1jaq8dx1lz92q0iygnc9amlzz33206pix6x"))))
    (build-system node-build-system)
    (arguments
     (list
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
                       ;; (delete 'build)
                       (delete 'validate-runpath))))
    (home-page "https://github.com/anthropics/claude-code")
    (synopsis
     "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.")
    (description
     "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.")
    (license #f)))

(define-public openai-codex
  (package
    (name "codex")
    (version "0.89.0")
    (source
     (origin
       (method url-fetch)
       (uri "https://registry.npmjs.org/@openai/codex/-/codex-0.89.0.tgz")
       (sha256
        (base32 "13nww8bi6ww56nsgccq0ri31p1dz95wkr9dvchdwbqb96zkz53s5"))))
    (build-system node-build-system)
    (arguments
     (list
      #:tests? #f
      #:phases
      #~(modify-phases %standard-phases
          (delete 'build)
          (delete 'validate-runpath))))
    (home-page "https://github.com/openai/codex#readme")
    (synopsis
     "<p align=\"center\"><code>npm i -g @openai/codex</code><br />or <code>brew install --cask codex</code></p> <p align=\"center\"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer. <p align=\"center\">   <img src=\"./.githu")
    (description
     "<p align=\"center\"><code>npm i -g @openai/codex</code><br />or <code>brew install --cask codex</code></p> <p align=\"center\"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer. <p align=\"center\">   <img src=\"./.githu")
    (license license:asl2.0)))

(define-public codex-acp
  (package
    (name "codex-acp")
    (version "0.9.0")
    (source
     (origin
       (method url-fetch)
       (uri
        "https://registry.npmjs.org/@zed-industries/codex-acp-linux-x64/-/codex-acp-linux-x64-0.9.0.tgz")
       (sha256
        (base32 "19jz5psj59jn56vvmhp2b70fx321q11n0n18kj9dfbsx517zf4v0"))))
    (build-system node-build-system)
    (native-inputs (list (default-patchelf)))
    (inputs (list `("openssl" ,openssl)
                  `("gcc:lib" ,gcc "lib")
                  `("libc32" ,(to32 glibc))))
    (arguments
     (list
      #:tests? #f
      #:imported-modules `((nonguix build binary-build-system)
                           (nonguix build utils)
                           ,@%node-build-system-modules)
      #:modules
      '((guix build node-build-system)
        (guix build utils)
        ((nonguix build binary-build-system) #:prefix binary:))
      #:phases
      #~(modify-phases %standard-phases
          (delete 'build)
          (add-before 'repack 'patchelf
            (lambda* (#:rest args)
              (apply
               (assoc-ref binary:%standard-phases 'patchelf)
               `(#:patchelf-plan
                 (("bin/codex-acp"
                   ("gcc:lib" "openssl" "libc")))
                 ,@args))))
          (add-after 'install 'symlink
            (lambda _
              (symlink (string-append #$output "/bin/codex-acp-linux-x64")
                       (string-append #$output "/bin/codex-acp")))))))
    (home-page "https://github.com/zed-industries/codex-acp")
    (synopsis
     "An ACP-compatible coding agent powered by Codex - linux x64 binary")
    (description
     "An ACP-compatible coding agent powered by Codex - linux x64 binary")
    (license license:asl2.0)))