all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* what am I doing wrong with girc?
@ 2022-09-03 13:39 jgart
  2022-09-03 14:24 ` Guillaume Le Vaillant
  0 siblings, 1 reply; 2+ messages in thread
From: jgart @ 2022-09-03 13:39 UTC (permalink / raw)
  To: Guix Help

Hi Guixers,

I'm trying to package girc:

https://github.com/McParen/girc/search?p=2&q=anvi

Should I be referencing the asd-system explicitly?

Does this asd system have some inconsistencies in how it was set up?

I have to use build-program to package the binary executable.

all best,

jgart

==========================================================================

;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages irc)
  #:use-module (guix build-system python)
  #:use-module (guix build-system asdf)
  #:use-module (guix build-system copy)
  #:use-module (guix gexp)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (guixrus packages common lisp)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages security-token)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-check)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-science)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages time)
  #:use-module (gnu packages lisp-xyz)
  #:use-module (gnu packages python-xyz))


(define-public girc
  (let ((commit "437697f0db8c926b5c294aa1d099c061e6a9d9ba")
        (revision "0"))
    (package
      (name "girc")
      (version (git-version "0.0.1" revision commit))
      (source
        (origin
          (method git-fetch)
          (uri (git-reference
                (url "https://github.com/McParen/girc")
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
           (base32 "13niqaa2x8mrrncl26wy15lmn3fayjpzicp8b94k65xqmbsya1vk"))))
      (build-system asdf-build-system/sbcl)
      (arguments
        (list
          #:phases
          #~(modify-phases %standard-phases
              (add-after 'create-asdf-configuration 'build-program
                (lambda* (#:key outputs #:allow-other-keys)
                  (build-program
                   (string-append (assoc-ref outputs "out") "/bin/girc")
                   outputs
                   #:entry-program '((girc:girc) 0)
                   #:dependencies '("split-sequence")))))))
      (inputs
        (list sbcl-alexandria
              sbcl-split-sequence
              sbcl-usocket
              sbcl-croatoan))
      (home-page "https://github.com/McParen/girc")
      (synopsis "Basic IRC client for the terminal")
      (description
"@code{girc} is a basic IRC client for the terminal.")
      (license license:expat))))

(define-public cl-girc
  (sbcl-package->cl-source-package girc))

(define-public ecl-girc
  (sbcl-package->ecl-package girc))




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: what am I doing wrong with girc?
  2022-09-03 13:39 what am I doing wrong with girc? jgart
@ 2022-09-03 14:24 ` Guillaume Le Vaillant
  0 siblings, 0 replies; 2+ messages in thread
From: Guillaume Le Vaillant @ 2022-09-03 14:24 UTC (permalink / raw)
  To: jgart; +Cc: Guix Help

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]

jgart <jgart@dismail.de> skribis:

> Hi Guixers,
>
> I'm trying to package girc:
>
> https://github.com/McParen/girc/search?p=2&q=anvi
>
> Should I be referencing the asd-system explicitly?
>
> Does this asd system have some inconsistencies in how it was set up?
>
> I have to use build-program to package the binary executable.
>
> all best,
>
> jgart
>
> [...]
>       (arguments
>         (list
>           #:phases
>           #~(modify-phases %standard-phases
>               (add-after 'create-asdf-configuration 'build-program
>                 (lambda* (#:key outputs #:allow-other-keys)
>                   (build-program
>                    (string-append (assoc-ref outputs "out") "/bin/girc")
>                    outputs
>                    #:entry-program '((girc:girc) 0)
>                    #:dependencies '("split-sequence")))))))
> [...]

I think the 'build-program' phase should be something like:

--8<---------------cut here---------------start------------->8---
(add-after 'create-asdf-configuration 'build-program
  (lambda* (#:key outputs #:allow-other-keys)
    (build-program (string-append (assoc-ref outputs "out") "/bin/girc")
                   outputs
                   #:entry-program '((girc:run))
                   #:dependencies '("girc")))
--8<---------------cut here---------------end--------------->8---

Where 'dependencies' indicates what library to load, and 'entry-program'
indicates which function of this library to call.

If girc is meant to be used as a standalone program, maybe you could
just call the package "girc" and put it in "irc.scm", and the "*cl-girc"
library packages would not be necessary.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-03 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-03 13:39 what am I doing wrong with girc? jgart
2022-09-03 14:24 ` Guillaume Le Vaillant

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.