guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Arcan


From: swedebugia
Subject: Re: Packaging Arcan
Date: Fri, 23 Nov 2018 19:09:55 +0100

Hi :)

On 2018-11-23 13:32, L p R n d n wrote:

Huummm... Hello again,

Forgot something again. :/

So one last question (let's hope).

Arcan load 'appl's which are basically applications written in Lua.
They don't need to be built, just copied to be used as is, so they don't
produce binaries. To start an appl with arcan, you need to
'arcan $(path-to-appl)'.
Whit Guix paths, it becomes quite complicated to load an appl.
Fortunatly, Arcan allows us to specify an ENV variable with a folder
containing the appls. Knowing that there can be multiple appls, how can
we make them all availabe in the same folder the be able to do:
'arcan $(appl-name)' which would be a lot nicer.

You have 2 choices as I see it:

1) What about creating a separate package for these without a build stage?
Then they end up in the store and guix can tell the user to set the ENV to point to them (see below). This only makes sense if they can be used separately from arcan.

2)Alternatively look at the git-definition. It has multiple origin-inputs.

If these are not always needed you could place them in a separate output Example from git:

        (add-after 'install 'split
          (lambda* (#:key inputs outputs #:allow-other-keys)
;; Split the binaries to the various outputs.

            (let* ((out      (assoc-ref outputs "out"))
                   (se       (assoc-ref outputs "send-email"))))))

This way they don't take up space for those who do not use them.

When the user installs them via e.g. arcan:appl, then they end up in the store and guix can tell the user to set the ENV to point to them.

This code in the git definition tells the user to set the correct ENV:

(native-search-paths
    (list
          snip

          (search-path-specification
           (variable "GIT_EXEC_PATH")
(separator #f) ;single entry

           (files '("libexec/git-core")))))

I did not yet package anything that needed this.

Tip: I find the easiest way to find a definition is using emacs-guix -> guix-edit -> git.

--
Cheers
Swedebugia

PS: writing this I learned something myself about how this works :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]