unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: help-guix@gnu.org
Subject: Re: About packaging documentation
Date: Wed, 17 Mar 2021 21:43:39 +0100	[thread overview]
Message-ID: <c9442069-7c43-5ecb-0cb4-2c87998d8f6a@posteo.de> (raw)
In-Reply-To: <874khan4cn.fsf@elephly.net>

Hi Ricardo!

On 3/16/21 11:03 PM, Ricardo Wurmus wrote:
> Hi Zelphir,
>
>> Hello Ricardo!
>>
>> On 3/15/21 4:43 PM, Ricardo Wurmus wrote:
>>> Hi Zelphir,
>>>
>>>> https://guix.gnu.org/cookbook/en/html_node/Packaging-Tutorial.html
>>>> is a good
>>>> start. It has even got cookbook in the name. Definitely the right idea to
>>>> complement the general documentation. I am aware of its existence.
>>>> Unfortunately, I could not get the basic approach of the "Hello World package"
>>>> working for my package, even though it is pure guile, no other library required
>>>> and no FFI or anything. I would have preferred not having to go through all the
>>>> autotools stuff, and to have this simple way working for my package. Perhaps I
>>>> did something slightly wrong. I do not know. Someone mentioned on the guile user
>>>> mailing list, that this is all that should be needed for a pure guile package.
>>>> Perhaps it can be updated?
>>> Could you share the code you’re trying to package?  Perhaps it will
>>> become clearer to us what you would like to see changed in the cookbook
>>> — and perhaps it will become clearer to you how packaging for Guix works.
>> Yes, I'll link it:
>>
>> https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e30413392908d9e3988e30e9411aa7
>> <https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e30413392908d9e3988e30e9411aa7>
>>
>> Or:
>>
>> https://notabug.org/ZelphirKaltstahl/guile-fslib/src/0.2.0
> Excellent.
>
> Here’s the package (I dumped this in (gnu packages guile-xyz)):
>
> --8<---------------cut here---------------start------------->8---
> (define-public guile-fslib
>   (package
>     (name "guile-fslib")
>     (version "0.2.0")
>     (source
>      (origin
>        (method git-fetch)
>        (uri (git-reference
>              (url "https://notabug.org/ZelphirKaltstahl/guile-fslib/")
>              (commit version)))
>        (file-name (git-file-name name version))
>        (sha256
>         (base32
>          "118d84p443w7hrslv8hjyhgws631ia08mggiyklkmk0b9plfdsvz"))))
>     (build-system guile-build-system)
>     (inputs
>      `(("guile" ,guile-3.0)))
>     (home-page "https://notabug.org/ZelphirKaltstahl/guile-fslib")
>     (synopsis "File system utilities")
>     (description
>      "This package contains like super cool file system utilities and stuff.
> It's really good and so easy to install!")
>     (license license:agpl3+)))
> --8<---------------cut here---------------end--------------->8---
>
> I only gave it a quick test like this:
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix environment --ad-hoc guile  guile-fslib -- guile
> […]
> GNU Guile 3.0.5
> Copyright (C) 1995-2021 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,use (file-system)
> scheme@(guile-user)> file-size-in-bytes
> $1 = #<procedure file-size-in-bytes (path)>
> scheme@(guile-user)> 
> --8<---------------cut here---------------end--------------->8---
>
> Seems to work.
>
> And this is what was installed:
>
> --8<---------------cut here---------------start------------->8---
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/logging.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-fslib.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-list-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-string-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/fslib.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-reader.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/list-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-system.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/string-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/file-system.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/file-reader.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-string-utils.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-fslib.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-list-utils.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/string-utils.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/fslib.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/list-utils.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/logging.scm
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/todo.org
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/LICENSE
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/README.md
> --8<---------------cut here---------------end--------------->8---
>
> One thing to note is that Guix didn’t run the tests, because it doesn’t
> know how to (there’s no generic way to run tests for Guile packages, so
> the build system doesn’t try).
>
> This can be changed by adding an “arguments” field to the package
> definition that adds a phase to run the tests.
>
Thank you for taking the time and having a look at this. I will have to look
into what mistakes I made following the cookbook and how to add tests using the
arguments field. Once I know more, I will get back to you or ask more questions
on the mailing list.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl



  reply	other threads:[~2021-03-17 20:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 14:46 About packaging documentation Zelphir Kaltstahl
2021-03-15 15:43 ` Ricardo Wurmus
2021-03-16 19:27   ` Zelphir Kaltstahl
2021-03-16 22:03     ` Ricardo Wurmus
2021-03-17 20:43       ` Zelphir Kaltstahl [this message]
2021-04-02 11:29       ` Zelphir Kaltstahl
2021-04-02 15:33         ` Zelphir Kaltstahl
2021-04-02 21:59           ` Ricardo Wurmus
2021-04-04 13:41             ` About packaging (was: About packaging documentation) Zelphir Kaltstahl
2021-04-04 14:35               ` Ricardo Wurmus
2021-04-04 15:57                 ` Zelphir Kaltstahl
2021-04-04 14:38               ` Tobias Geerinckx-Rice
2021-04-04 15:30                 ` Zelphir Kaltstahl
2021-04-02 21:56         ` About packaging documentation Ricardo Wurmus
2021-04-04 13:59           ` Zelphir Kaltstahl

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=c9442069-7c43-5ecb-0cb4-2c87998d8f6a@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=rekado@elephly.net \
    /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).