unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gexps
@ 2016-08-30 18:01 David Craven
  2016-09-01 11:38 ` gexps Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: David Craven @ 2016-08-30 18:01 UTC (permalink / raw)
  To: guix-devel

Hi, I have a couple of questions:

How do gexps relate to packages? Are they used in the
package->bag->derivation process or is it just for writing services?

gexp->script and gexp->file only dump text into the store. How can I
make them ignore the system/target architectures?

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

* Re: gexps
  2016-08-30 18:01 gexps David Craven
@ 2016-09-01 11:38 ` Ludovic Courtès
  2016-09-01 11:58   ` gexps David Craven
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-09-01 11:38 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

David Craven <david@craven.ch> skribis:

> Hi, I have a couple of questions:
>
> How do gexps relate to packages? Are they used in the
> package->bag->derivation process or is it just for writing services?

Yes, currently.

Currently the bag->derivation process uses
‘build-expression->derivation’, which is the (ugly) predecessor of
‘gexp->derivation’.

The goal is to switch over to gexps eventually; ‘wip-build-systems-gexp’
does exactly that, but there were performance regressions that I never
took the time to address completely.

> gexp->script and gexp->file only dump text into the store. How can I
> make them ignore the system/target architectures?

It’s not really possible, though I agree it would be nice!

If we force use of the host system type (say x86_64-linux), independent
of (%current-system) (say mips64el-linux), we approach what you want.
However, that would give us different derivations depending on the host
system type.  That is, ‘guix system build -s mips64el-linux -d’ on
x86_64 would return something different from ‘guix system build -d’ on
mips64.  This is not desirable.

An option would to have ‘gexp->file’ produce a fixed-output derivation
(it can compute the hash of the output on the host side).

Or maybe we need another mechanism similar to fixed-output derivations
to define equivalence classes of derivations.

Food for thought…

Ludo’.

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

* Re: gexps
  2016-09-01 11:38 ` gexps Ludovic Courtès
@ 2016-09-01 11:58   ` David Craven
  2016-09-01 12:59     ` gexps Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: David Craven @ 2016-09-01 11:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

> If we force use of the host system type (say x86_64-linux), independent
> of (%current-system) (say mips64el-linux), we approach what you want.
> However, that would give us different derivations depending on the host
> system type.  That is, ‘guix system build -s mips64el-linux -d’ on
> x86_64 would return something different from ‘guix system build -d’ on
> mips64.  This is not desirable.

Maybe an option would be if %current-system != host-system run guile
using qemu-arm?

> An option would to have ‘gexp->file’ produce a fixed-output derivation
> (it can compute the hash of the output on the host side).
>
> Or maybe we need another mechanism similar to fixed-output derivations
> to define equivalence classes of derivations.

I'll have to read up on fixed-output derivations. Can you give me an
example of where they are used currently?

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

* Re: gexps
  2016-09-01 11:58   ` gexps David Craven
@ 2016-09-01 12:59     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-09-01 12:59 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

David Craven <david@craven.ch> skribis:

>> If we force use of the host system type (say x86_64-linux), independent
>> of (%current-system) (say mips64el-linux), we approach what you want.
>> However, that would give us different derivations depending on the host
>> system type.  That is, ‘guix system build -s mips64el-linux -d’ on
>> x86_64 would return something different from ‘guix system build -d’ on
>> mips64.  This is not desirable.
>
> Maybe an option would be if %current-system != host-system run guile
> using qemu-arm?

That would make it a different derivation.

>> An option would to have ‘gexp->file’ produce a fixed-output derivation
>> (it can compute the hash of the output on the host side).
>>
>> Or maybe we need another mechanism similar to fixed-output derivations
>> to define equivalence classes of derivations.
>
> I'll have to read up on fixed-output derivations. Can you give me an
> example of where they are used currently?

For downloads (origins).  The manual mentions it briefly.

Ludo’.

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

end of thread, other threads:[~2016-09-01 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 18:01 gexps David Craven
2016-09-01 11:38 ` gexps Ludovic Courtès
2016-09-01 11:58   ` gexps David Craven
2016-09-01 12:59     ` gexps Ludovic Courtès

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