unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: amirouche@hyper.dev
To: HiPhish <hiphish@posteo.de>
Cc: guile-user@gnu.org,
	guile-user <guile-user-bounces+amirouche=hyper.dev@gnu.org>
Subject: Re: Make a library installable?
Date: Mon, 13 May 2019 00:23:31 +0200	[thread overview]
Message-ID: <8da6c39894d7ba12c32d2bfad28d64ea@hyper.dev> (raw)
In-Reply-To: <6372591.9J7NaK4W3v@aleksandar-ixtreme-m5740>

On 2019-05-12 16:50, HiPhish wrote:
> Hello Schemers,
> 
> A while ago I presented my MessagePack implementation for Guile[1] here 
> and I
> want to make it available to users.

> Guile has no dedicated package manager,

I use guile as my package manager, It is easy enough to install.
And Since I keep GUIX environment variable in a dedicated file
it doesn't interfere with the host environment. Basically, I have
no problem with guix.

> so it's either manual or Guix, and I would like to support both. What
> it the best way of doing it?

Yeah manual is good enough. Also, guix has guile-build-system
that doesn't require autotools.

Here is the package definition for a small single file project
that required to dynamicly load a shared library:

(define-public guile-termbox
   (package
     (name "guile-termbox")
     (version "0.1.1")
     (home-page "https://git.sr.ht/~amz3/guile-termbox")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url home-page)
                     (commit 
"8d43b12799bc1967b12cf0e86b4c323c1e251cb4")))
               (sha256
                (base32
                 "1wc2246gg0dg5g7f7djrl0jy7dvzkjhw0idmijwvnd9r1dgksacq"))
               (file-name (string-append name "-" version "-checkout"))))
     (build-system guile-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
                   (add-before 'build 'patch
            (lambda* (#:key inputs #:allow-other-keys)
              (let* ((libtermbox   (assoc-ref inputs "termbox")))
                (substitute* "termbox.scm"
                  (("@LIBTERMBOX@")
                   (format #f "~a/lib/libtermbox.so" libtermbox)))
                #t))))))
     (inputs
      `(("guile" ,guile-2.2)
        ("termbox" ,termbox-truecolor)))
     (propagated-inputs
      `(("guile-bytestructures" ,guile-bytestructures)))
     (synopsis "GNU Guile bindings for termbox")
     (description "GNU Guile bindings for termbox")
     (license license:lgpl3+)))

https://git.sr.ht/~amz3/guix-amz3-channel/tree/master/amz3/termbox.scm#L40

Hope This Helps,


Amirouche ~ amz3



  parent reply	other threads:[~2019-05-12 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12 14:50 Make a library installable? HiPhish
2019-05-12 20:18 ` Make a library installable? → conf Arne Babenhauserheide
2019-05-12 20:50   ` Arne Babenhauserheide
2019-05-12 22:23 ` amirouche [this message]
2019-05-13 22:22   ` Make a library installable? HiPhish
2019-05-14 10:57     ` Amirouche Boubekki
2019-05-15 17:31 ` Catonano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8da6c39894d7ba12c32d2bfad28d64ea@hyper.dev \
    --to=amirouche@hyper.dev \
    --cc=guile-user-bounces+amirouche=hyper.dev@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=hiphish@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).