[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Packaging Arcan
Re: Packaging Arcan
Fri, 23 Nov 2018 19:09:55 +0100
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
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:
(separator #f) ;single entry
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.
PS: writing this I learned something myself about how this works :)