unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Profile hook in build environment?
@ 2020-09-09  8:19 Guillaume Le Vaillant
  2020-09-09  8:35 ` Pierre Neidhardt
  2020-09-09  8:50 ` Ricardo Wurmus
  0 siblings, 2 replies; 5+ messages in thread
From: Guillaume Le Vaillant @ 2020-09-09  8:19 UTC (permalink / raw)
  To: guix-devel

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

Hi,

I'm currently experimenting with modifications of the asdf-build-system
to see if it can be simplified.

I tried adding a profile hook that creates the ASDF configuration files
in 'etc/common-lisp/' based on the lisp packages that are present in the
manifest. When using 'guix environment -C --ad-hoc sbcl-lift' for
example, the configuration files are created and contain the right paths
for the sources and compiled files of sbcl-lift, which allows sbcl to
find and load the library.

However, when building a package depending on sbcl-lift, for example
with 'guix build sbcl-trivial-backtrace', sbcl fails to find sbcl-lift.
So it seems that the build environment created by 'guix build' doesn't
run profile hooks, and the ASDF configuration files are missing.

Is there a way to generate files and add them to the environment created
by 'guix build' as it can be done with profile hooks?

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

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

* Re: Profile hook in build environment?
  2020-09-09  8:19 Profile hook in build environment? Guillaume Le Vaillant
@ 2020-09-09  8:35 ` Pierre Neidhardt
  2020-09-09  8:50 ` Ricardo Wurmus
  1 sibling, 0 replies; 5+ messages in thread
From: Pierre Neidhardt @ 2020-09-09  8:35 UTC (permalink / raw)
  To: Guillaume Le Vaillant, guix-devel

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

Hi Guillaume,

Thanks for taking a shot at this ;)

Why would we need to generate the ASDF configuration file in a hook?
Can't we do it at build time?

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

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

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

* Re: Profile hook in build environment?
  2020-09-09  8:19 Profile hook in build environment? Guillaume Le Vaillant
  2020-09-09  8:35 ` Pierre Neidhardt
@ 2020-09-09  8:50 ` Ricardo Wurmus
  2020-09-10  7:24   ` Guillaume Le Vaillant
  1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2020-09-09  8:50 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: guix-devel


Guillaume Le Vaillant <glv@posteo.net> writes:

> Is there a way to generate files and add them to the environment created
> by 'guix build' as it can be done with profile hooks?

Yes, the build system can do whatever it wants.  The
texlive-build-system, for example, builds a union directory from all TeX
Live inputs and then modifies the configuration file.

-- 
Ricardo


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

* Re: Profile hook in build environment?
  2020-09-09  8:50 ` Ricardo Wurmus
@ 2020-09-10  7:24   ` Guillaume Le Vaillant
  2020-09-10  9:57     ` Pierre Neidhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Guillaume Le Vaillant @ 2020-09-10  7:24 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

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


Ricardo Wurmus <rekado@elephly.net> skribis:

> Guillaume Le Vaillant <glv@posteo.net> writes:
>
>> Is there a way to generate files and add them to the environment created
>> by 'guix build' as it can be done with profile hooks?
>
> Yes, the build system can do whatever it wants.  The
> texlive-build-system, for example, builds a union directory from all TeX
> Live inputs and then modifies the configuration file.

Thanks for the pointer, it has been very useful.


Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> Hi Guillaume,
>
> Thanks for taking a shot at this ;)
>
> Why would we need to generate the ASDF configuration file in a hook?
> Can't we do it at build time?
>
> Cheers!

I got rid of the hook and now I'm creating all the required files/links
at build time in 'etc/common-lisp/source-registry.conf.d/' and in
'etc/common-lisp/asdf-output-translations.conf.d/'.
It seems to work well with packages having simple definitions. Now
I have to check and adapt the more complex ones.

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

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

* Re: Profile hook in build environment?
  2020-09-10  7:24   ` Guillaume Le Vaillant
@ 2020-09-10  9:57     ` Pierre Neidhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Neidhardt @ 2020-09-10  9:57 UTC (permalink / raw)
  To: Guillaume Le Vaillant, Ricardo Wurmus; +Cc: guix-devel

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

Guillaume Le Vaillant <glv@posteo.net> writes:

> I got rid of the hook and now I'm creating all the required files/links
> at build time in 'etc/common-lisp/source-registry.conf.d/' and in
> 'etc/common-lisp/asdf-output-translations.conf.d/'.
> It seems to work well with packages having simple definitions. Now
> I have to check and adapt the more complex ones.

Great!
Don't hesitate the share your work on a wip- branch if it gets too overwhelming.

In the past I discussed the idea of defining the Common Lisp packages
this way: move the sbcl- and ecl- packages to the "sbcl" and "ecl"
outputs respectively.
The "sbcl" output can be used to confirm the package builds properly.

Another thing we need to fix is support for the package-infered systems
like cl-dbus.

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

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

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

end of thread, other threads:[~2020-09-10  9:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09  8:19 Profile hook in build environment? Guillaume Le Vaillant
2020-09-09  8:35 ` Pierre Neidhardt
2020-09-09  8:50 ` Ricardo Wurmus
2020-09-10  7:24   ` Guillaume Le Vaillant
2020-09-10  9:57     ` Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

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

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).