~whereiseveryone/guixrus

ba1875cb4f0a77768e5e9339be51c09460eda19c — jgart 1 year, 16 days ago 44b73c7
Add cl-git-forge.
1 files changed, 61 insertions(+), 0 deletions(-)

M guixrus/packages/common/lisp.scm
M guixrus/packages/common/lisp.scm => guixrus/packages/common/lisp.scm +61 -0
@@ 819,3 819,64 @@ using guix.")

(define-public ecl-cl-guix-utils
  (sbcl-package->ecl-package sbcl-cl-guix-utils))

(define-public sbcl-git-forge
  (let ((commit "e4e690416ab92f271d8099abed3d6dd4414029ca")
        (revision "0"))
    (package
      (name "sbcl-git-forge")
      (version (git-version "0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~whereiseveryone/git-forge")
               (commit commit)))
         (file-name (git-file-name "cl-git-forge" version))
         (sha256
          (base32 "0wa25fjpjbn9vr7v1h8mxwjrni38bpw8y7sx5gwzw6hn8nvfq6g1"))))
      (build-system asdf-build-system/sbcl)
      (outputs '("out" "bin"))
      (arguments
       '(#:asd-systems '("jgart.git-forge")
         #:phases
         (modify-phases %standard-phases
           (add-after 'create-asdf-configuration 'build-and-install-binary
             (lambda* (#:key outputs #:allow-other-keys)
               (setenv "HOME" (getcwd))
               (invoke
                "sbcl" "--eval" "(require :asdf)" "--eval"
                (format
                 #f "~S"
                 `(progn
                   (require "jgart.git-forge"
                            ,(string-append (getcwd) "/jgart.git-forge.asd"))
                   (asdf:make "jgart.git-forge"))))
               (install-file
                (string-append (getcwd) "/git-forge")
                (string-append (assoc-ref outputs "bin") "/bin")))))))
      (inputs
       (list sbcl-cl-str
             sbcl-legit
             sbcl-trivial-open-browser
             sbcl-binding-arrows))
      (home-page "https://git.sr.ht/~whereiseveryone/git-forge")
      (synopsis "Open the forge for each git remote in your browser")
      (description "This command line tool opens the forge
(e.g. SourceHut) for each remote in a Git repository in your web
browser.")
      (license license:agpl3))))

(define-public cl-git-forge
  (sbcl-package->cl-source-package sbcl-git-forge))

(define-public ecl-git-forge
  (let ((ecl-package (sbcl-package->ecl-package sbcl-git-forge)))
    (package
      (inherit ecl-package)
      (outputs '("out"))
      (arguments
       (substitute-keyword-arguments (package-arguments ecl-package)
         ((#:phases phases)
          `(modify-phases ,phases
             (delete 'build-binary))))))))