guix-devel
[Top][All Lists]
Advanced

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

Building things other than Guix with Cuirass


From: Christopher Baines
Subject: Building things other than Guix with Cuirass
Date: Mon, 18 Sep 2017 21:59:06 +0100

Hey,

At the GHM, one of the things I looked in to was cuirass. Specifically,
I tried to see if I could build a collection of guix packages that sit
outside of Guix.

From trying to use cuirass for a few hours, I began thinking that it
might be beneficial to change the interface between cuirass and the
jobs.

The interface provided by cuirass to fetch jobs through consists of
specifying a Guile load path, file, procedure, and arguments to that
procedure.

Currently, something like this is used to describe how to get some
jobs.

  `((#:name . "hello")
    (#:url . "git://git.savannah.gnu.org/guix.git")
    (#:branch . "master")
    (#:no-compile? . #t)
    (#:load-path . ".")
    (#:proc . cuirass-jobs)
    (#:file . "/tmp/drv-file.scm")
    (#:arguments (subset . "hello")))

As an example, with minor changes to the way arguments are handled, I
think this could also be represented as a invocation of guile.

  `((#:name . "hello")
    (#:url . "git://git.savannah.gnu.org/guix.git")
    (#:branch . "master")
    (#:no-compile? . #t)
    (#:command "guile -L. -s /tmp/drv-file.scm -e cuirass-jobs -- 
--subset=hello"))

However, if you've gone to the trouble to have a Guile program, it
might be easier to make it executable directly.

  `((#:name . "hello")
    (#:url . "git://git.savannah.gnu.org/guix.git")
    (#:branch . "master")
    (#:no-compile? . #t)
    (#:command "/tmp/drv-file.scm --subset=hello"))

It might also be possible to remove the hardcoded compilation process
and just use the single command. However, it might be better to be able
to specify a separate compilation command or list of commands.

Back to the jobs though, Cuirass already executes a separate command to
load jobs, but this is hardcoded to the evaluate command. I think
changing the interface to allow directly specifying a command would
open up new possibilities for cuirass, and at the same time simplify
the implementation and interface.

I've tried out using this approach for building a collection of guix
packages that sit outside of guix, and it seems to work well. I copied
one of the examples, and wrote a guile program that when run prints out
the jobs. Cuirass then runs a bash script that sets up the correct
environment with the guix environment command, and then invokes the
guile script to generate the jobs.

I'm half way through writing a proper patch for this, but I haven't
moved all the functionality in the evaluate command in to cuirass yet.

Does anyone have any opinions or ideas about this part of cuirass, or
building things other than the packages in the Guix repository with it?

Thanks,

Chris

Attachment: pgpx6zDFxpDfe.pgp
Description: OpenPGP digital signature


reply via email to

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