From patchwork Sun Dec 29 09:33:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 19468 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D98A517992; Sun, 29 Dec 2019 09:34:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 70F7017952 for ; Sun, 29 Dec 2019 09:34:10 +0000 (GMT) Received: from localhost ([::1]:50360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilUxe-00089x-0c for patchwork@mira.cbaines.net; Sun, 29 Dec 2019 04:34:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50887) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilUxY-00089r-1g for guix-patches@gnu.org; Sun, 29 Dec 2019 04:34:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilUxW-0001FN-J2 for guix-patches@gnu.org; Sun, 29 Dec 2019 04:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilUxW-0001EX-Eb for guix-patches@gnu.org; Sun, 29 Dec 2019 04:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilUxW-0004JC-8b for guix-patches@gnu.org; Sun, 29 Dec 2019 04:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38612] Pass system and target arguments to gexp->file. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Dec 2019 09:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38612 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 38612@debbugs.gnu.org Received: via spool by 38612-submit@debbugs.gnu.org id=B38612.157761201116527 (code B ref 38612); Sun, 29 Dec 2019 09:34:02 +0000 Received: (at 38612) by debbugs.gnu.org; 29 Dec 2019 09:33:31 +0000 Received: from localhost ([127.0.0.1]:59242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilUx1-0004IV-1z for submit@debbugs.gnu.org; Sun, 29 Dec 2019 04:33:31 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:35101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilUwz-0004II-42 for 38612@debbugs.gnu.org; Sun, 29 Dec 2019 04:33:29 -0500 Received: by mail-wr1-f43.google.com with SMTP id g17so30189702wro.2 for <38612@debbugs.gnu.org>; Sun, 29 Dec 2019 01:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=fliPIeVpwZkYxvO97xtUfMef3sHHxGeQa/lNUu4IZYw=; b=LeZiv549BDuyfZZxzv5OWNt9I3Jo6xBDQ6BMueD+wUFm+bknu56rt8nnaKtPZd1YnT ab81Zlp6uKHv4gHmGgW+e1+C8YUV+COrcPcjl3mJzv0rysCYyzA7M5ODhuEys3BQOhJ3 0RsxlI4AUKcYxe1TFeqY78HetSdBrQZkQoVSdCeN+Daqa/DHraiyk2qEnu1d9I/4qPCP d2qWNifOcKXD5t0rCozpHzKZCyRu31i6ri1KGtTMO7qmC5bhZOQAnBXjF6UKhc3q+DrB g1UZ4CO8QeKX+Jcybg2pwkDVm9iLuJVqo8+plcYraC/KdwJX5hBT3qc60FV4he6w1iRu hh9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=fliPIeVpwZkYxvO97xtUfMef3sHHxGeQa/lNUu4IZYw=; b=IUmuVKb9aSwct76ccJTbz61qvnVIjWNRK31CjJO6bvIx5hVMPel+VvI1ckQ6Dr4on5 NPZ8I8kbpmDp5H7w04OJvDE9vbHhhwaFMUJ05Wvhd3WLdo5ThGdJSfxUiia8vyx8z6CE VzeRAhLpZU4/GBLI0UhA1ohTsZ2ze41PmceRYoZZsTMmCau5BY4JfqiNFEx01oMaW82i nbVEi3JxE2xLLg56OMA0jpQauuT/gMCsj3/LW+TfkI0LY9ANz7v0XWDlHruyJdmQBabD XAMtZVmvPzDjbDkX1yPiTglNZBWR46dx3Zfyj3GoXSEOADNj6H4+97OpGxWb7eE6oaiB chFQ== X-Gm-Message-State: APjAAAXf5NU2cUpofDoWlJqLcuS5EuhLkBaweeYbVph8X3jIn2iny3La QufC+9MQMXmuBMxYfMcuzMqefMYt X-Google-Smtp-Source: APXvYqw/eUE5xqnJWpkcr7rQjYCbZj1CJYwIeabnC+9V/MQ4v+prncqZdLojT67rqdj/BzQ3Vy1YPA== X-Received: by 2002:adf:f1d0:: with SMTP id z16mr58277020wro.209.1577612002911; Sun, 29 Dec 2019 01:33:22 -0800 (PST) Received: from cervin ([2a01:cb18:832e:5f00:fc44:c711:5fe:9e86]) by smtp.gmail.com with ESMTPSA id d8sm41747628wre.13.2019.12.29.01.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2019 01:33:21 -0800 (PST) References: <87a77ug6vv.fsf@gmail.com> <8736dl8wxq.fsf@gmail.com> <87d0cipt6z.fsf@gnu.org> <87r20t7r0j.fsf@gmail.com> <87imm468rr.fsf@gmail.com> <87d0cbhsk1.fsf@gnu.org> <87mubej4sq.fsf@gmail.com> <87a77dhce4.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Mathieu Othacehe In-reply-to: <87a77dhce4.fsf@gnu.org> Date: Sun, 29 Dec 2019 10:33:20 +0100 Message-ID: <878smvtr1b.fsf@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hey Ludo, Then, here's a patch that set the default target to 'current in lower-object, gexp->file and gexp->script. Then, (current-target-system) is used at bind time if target is 'current (same way as gexp->derivation and lower-gexp). An additionnal patch is needed because lower-object is called without a default target in lower-gexp, when lowering extensions. WDYT? Mathieu From 21af4b796fb638c0c70a4b73d9add53ee2e9747e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 28 Dec 2019 21:53:05 +0100 Subject: [PATCH 2/2] gexp: lower-gexp: Do not pass default target to lower-object. Default target argument of lower-object is no longer #f but the current target system. However, even if %current-target-system is set, we do not want to cross-compile gexp extensions. * guix/gexp.scm (lower-gexp): Make sure that extensions are not cross-built by passing #f as target argument of lower-object. --- guix/gexp.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index 11d4e86037..027701a201 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -756,7 +756,8 @@ derivations--e.g., code evaluated for its side effects." (extensions -> (gexp-extensions exp)) (exts (mapm %store-monad (lambda (obj) - (lower-object obj system)) + (lower-object obj system + #:target #f)) extensions)) (modules+compiled (imported+compiled-modules %modules system -- 2.24.1