From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: gexps Date: Thu, 01 Sep 2016 13:38:17 +0200 Message-ID: <87zinrrgt2.fsf@gnu.org> References: 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]:33296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfQK9-0004oB-DZ for guix-devel@gnu.org; Thu, 01 Sep 2016 07:38:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfQK5-0004XN-DR for guix-devel@gnu.org; Thu, 01 Sep 2016 07:38:25 -0400 In-Reply-To: (David Craven's message of "Tue, 30 Aug 2016 20:01:19 +0200") 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" To: David Craven Cc: guix-devel David Craven 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 =E2=80=98build-expression->derivation=E2=80=99, which is the (ugly) predece= ssor of =E2=80=98gexp->derivation=E2=80=99. The goal is to switch over to gexps eventually; =E2=80=98wip-build-systems-= gexp=E2=80=99 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=E2=80=99s 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, =E2=80=98guix system build -s mips64el-linux -d=E2= =80=99 on x86_64 would return something different from =E2=80=98guix system build -d= =E2=80=99 on mips64. This is not desirable. An option would to have =E2=80=98gexp->file=E2=80=99 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=E2=80=A6 Ludo=E2=80=99.