From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sree Harsha Totakura Subject: Re: Guix, Hydra & Nix Date: Mon, 31 Mar 2014 10:36:30 +0200 Message-ID: <5339290E.8050208@totakura.in> References: <5335768A.3080702@totakura.in> <8738i2m2ur.fsf@gnu.org> Reply-To: sreeharsha@totakura.in Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUXik-0001CV-Ow for guix-devel@gnu.org; Mon, 31 Mar 2014 04:37:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUXie-00059z-Bk for guix-devel@gnu.org; Mon, 31 Mar 2014 04:37:30 -0400 In-Reply-To: <8738i2m2ur.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Cc: guix-devel Hi Ludo, Thank you very much. Please ACK my understanding. On 03/28/2014 10:26 PM, Ludovic Court=C3=A8s wrote: > Sree Harsha Totakura skribis: >=20 >> From the sources, I found that build-aux/hydra/*.scm convert packages = into a >> format hydra understands for building them. >=20 > Yes. Specifically, build-aux/hydra/*.scm return a list of =E2=80=9Cjob= s=E2=80=9D, where > each job is represented as an alist with a number of compulsory items, > such as =E2=80=98derivation=E2=80=99 (see =E2=80=98package->alist=E2=80= =99.) >=20 OK, so the list of jobs is what is termed as a jobset in Hydra. Jobset i= s a collection of jobs + configuration for when to rebuild the jobset and whe= re to get the jobset's inputs (sources). The file build-aux/hydra/gnu-system.scm prepares the jobset which contain= s all packages currently in Guix. This jobset is configured in hydra.gnu.org t= o initiate a build whenever there is a new commit in Guix source repository= . The file build-aux/hydra/guix.scm is a jobset to build Guix iteself. > The result of those scripts is then consumed by Hydra=E2=80=99s > hydra-eval-guile-jobs: >=20 > https://github.com/NixOS/hydra/blob/master/src/script/hydra-eval-guil= e-jobs.in >=20 > hydra-eval-guile-jobs is itself called by hydra-evaluator, from here: >=20 > https://github.com/NixOS/hydra/blob/master/src/lib/Hydra/Helper/AddBu= ilds.pm >=20 Aye, this is where the magic happens. So it looks at the file extension = of the jobset's recipe and if it is .scm, then it uses Guix. >> Hydra refuses to install without nix-store. So Nix has to be installe= d as well. >> I'm guessing Hydra uses nix-store command to build and retrieve store = paths for >> packages given to it. Is it true? >=20 > Yes. =E2=80=98nix-store=E2=80=99 is essentially a client of {guix,nix}= -daemon, just > like =E2=80=98guix build=E2=80=99. Hydra passes =E2=80=98nix-store=E2=80= =99 a .drv file name, a > low-level representation of the build process; =E2=80=98nix-store=E2=80= =99 doesn=E2=80=99t have > to care whether it was produced by Guix or Nix, and can=E2=80=99t tell = the > difference. (Similarly, =E2=80=98guix build=E2=80=99 can be passed a .= drv produced by > Nix.) >=20 >> If so, how can hydra nix-store compile Guix packages? >=20 > Just like this. :-) Ah, so the derivations, when sent to {guix,nix}-daemon are expressed in t= he same format? `guix build' converts our guile code into this format. So, when Hydra sees a .scm file as input, it asks Guix to convert the job= set into derivations which are then sent to the {guix,nix}-daemon via 'nix-st= ore'. Does this mean that {guix,nix}-daemon are interchangeable? Can Hydra run= with the setup: guix clients, nix clients, guix-daemon, Hydra? Or does it nee= d a nix-daemon? Sree