From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EMNnKWyveGK4HQAAbAwnHQ (envelope-from ) for ; Mon, 09 May 2022 08:06:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YCB5KWyveGItPwEA9RJhRA (envelope-from ) for ; Mon, 09 May 2022 08:06:36 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6737F88D5 for ; Mon, 9 May 2022 08:06:36 +0200 (CEST) Received: from localhost ([::1]:42854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnwXT-0001ip-4S for larch@yhetil.org; Mon, 09 May 2022 02:06:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnwVy-0001h4-Sd for guix-patches@gnu.org; Mon, 09 May 2022 02:05:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnwVy-0004nv-Jl for guix-patches@gnu.org; Mon, 09 May 2022 02:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnwVy-0000x5-F7 for guix-patches@gnu.org; Mon, 09 May 2022 02:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55248] [PATCH v3 6/9] gnu: stex: Get machine type dynamically. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 06:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55248 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55248@debbugs.gnu.org Cc: Liliana Marie Prikler , Maxime Devos , Philip McGrath , Liliana Marie Prikler Received: via spool by 55248-submit@debbugs.gnu.org id=B55248.16520762473549 (code B ref 55248); Mon, 09 May 2022 06:05:02 +0000 Received: (at 55248) by debbugs.gnu.org; 9 May 2022 06:04:07 +0000 Received: from localhost ([127.0.0.1]:55713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnwV5-0000v5-Bs for submit@debbugs.gnu.org; Mon, 09 May 2022 02:04:07 -0400 Received: from mail-ua1-f49.google.com ([209.85.222.49]:35606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnwUv-0000tH-IA for 55248@debbugs.gnu.org; Mon, 09 May 2022 02:03:57 -0400 Received: by mail-ua1-f49.google.com with SMTP id x11so5062391uao.2 for <55248@debbugs.gnu.org>; Sun, 08 May 2022 23:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wfcAH5XAdwVPDZfDmFM08aox4jzMZXPVfAuJLvSM8WE=; b=duK2JrSxOlmn3OX26POj1SIPfZ4DYdl6OGgJEbE2luX8FCLpb1ZAP608qy7kdzhb0+ WSre12PIcqaTi/1VXdhU2V63GFnKCPiIAgf7BvLMJVHPTLsw6OEdakKhAOmnhXr43BvP Eoxq8ctX5gh3d4EnVIMHfLYZ1GwMZU7cfHVszbnfQmhqWz5S8dMYT6ThWQRgrk1H9JvC nA8LdeC7L5VZAK63Dmc8RDF8N6VA2xSNSb47Bb0jSNiPuAxjnyuNDsww8kNaa2P9n9Bw 27RhV9i3XfIfFAKHun/92sjomMf9DXXb/56YzZJlpaF5wFv03JzmgHFxc+D1z4cAtfX4 0b4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wfcAH5XAdwVPDZfDmFM08aox4jzMZXPVfAuJLvSM8WE=; b=o6T2bpjrsH+yi+iBiumcsFxHTSySk3n4tDVW6mXLr4kpOY67i5cnJd6j4B8NWINP1J Ck/78OZ+BdZLMWCq+uXHuj8+ITPONOWzpzAUh/mt0q3tWSRk+xUZ6kLUtFH0CUbPMVRb +YIFTcMNo4ABpzQFpZvXUGxhlLcXYSImGP5xF1KiVG9IZLqU2hofCwaoip9U0146SD3Z RkSS5+Nxi3EJF0vWPFfuwbVJqTemwIQfONlzTupm03TdM9bYlQTq1SZlH2Q8crBeDkyT czWL1Sea8cc6qZpt31DIG4tpL+Bdjt+03u28JyOS1HAhed8FM+YgPJZPb9Jw6lcfYugh 1YYw== X-Gm-Message-State: AOAM533wrn5AqTPpT4p0BrEn3nfGCtGt3I9cmiHAJyHX69I1axutD5HO YC/8ldKsxr7H4EVj5FutqNepr+x8sVOAk0KC X-Google-Smtp-Source: ABdhPJyJ1bW2dbZc+UEX0S5ICHOCHFTqxc3gK80oWXe3mGngP1j6CYuCsjzVAXgaWp+YNdlas0XElA== X-Received: by 2002:ab0:15ed:0:b0:365:f250:7384 with SMTP id j42-20020ab015ed000000b00365f2507384mr2309472uae.44.1652076232068; Sun, 08 May 2022 23:03:52 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id e188-20020a1f1ec5000000b00352319fb500sm1273444vke.48.2022.05.08.23.03.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 May 2022 23:03:51 -0700 (PDT) From: Philip McGrath Date: Mon, 9 May 2022 02:02:47 -0400 Message-Id: <6521decd69c70fe38b056c2dbec10d1a1af0e570.1652075689.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652076396; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wfcAH5XAdwVPDZfDmFM08aox4jzMZXPVfAuJLvSM8WE=; b=kgz4UJkH7FnZeRhu/1ipfv2CdygFpEtHeLPQvU5oO3rVdSrfaz6RFabsU48ewHnIEXpWYa FuNONu+k4GiGoIiJ/+b6ZRFzcyRP2SS+mL+N6ez0KDHTxL4qt/oBqrUe5pzP8tPV7285qE eu/6BSdNBVA30/os8fAlYd8RZg1jgJ5SaN301hVuRreEyKUN38XDMRXiYiJA9xOXSYYE2t C5WdRbsb8qKIybjA51pXVZraLX+GgJKglXlWfPdC9akkvtA1kr6WH81WcOKHNS6LQoWlKn CSKL3z5DOPB6jEuO4W+X+CId2QRPRNxcMehAjBM6V/Qn3KIUhADCZcMA0R90CQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652076396; a=rsa-sha256; cv=none; b=FhgQVu8/NKdMVUlu4VRZl3bQWjs+RGjECFA/DDqDmb8bJlWUE2NtlTSyW35ZJU0BcEskd5 LgI7qGIBQbUk/F966Z0kNsNLoH7ESS7FP8Ytr4lErEXl8PbRhqG9j6lbCvj8BJnh0NM9fR TFZq0sKSjgj2GcXyLmCWzwbwZ08nCt0iqLfK7WrrdO2stMwSTGTmTg+jRkZH+TSHf9GjOU u/o7H0YuYmsxFf1TLxC2mEsWZgO2Dv7QYhIovhrPnJmhaDGdcIms/Zb5IsnuUomOBYSzU8 NCnpP2S80hz7CqJyGf/OBqs47N4HSAQm1qfUECwjghPZpfr8OeIXLoiQRWL7sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=duK2JrSx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.00 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=duK2JrSx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6737F88D5 X-Spam-Score: 5.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: Mbjoh2kOp5sj * gnu/packages/chez.scm (stex)[arguments]: Run 'scheme' to determine the machine type. --- gnu/packages/chez.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 785b6837c1..dd485d37e1 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -602,6 +602,10 @@ (define-public stex-bootstrap ("src" "lib/stex/") ("Mf-stex" "lib/stex/") ("Makefile.template" "lib/stex/")) + #:modules + '((guix build copy-build-system) + (guix build utils) + (ice-9 popen)) #:phases #~(modify-phases %standard-phases (add-before 'install 'patch-sources @@ -633,8 +637,14 @@ (define-public stex-bootstrap (define makefile (string-append (getcwd) "/Makefile")) (define machine - #$(and=> (nix-system->chez-machine) - chez-machine->threaded)) + (let ((pipe (open-pipe* OPEN_BOTH scheme "-q"))) + ;; try to not be wrong for cross-compilation + ;; (avoid #% reader abbreviation for Guile) + (write '(($primitive $target-machine)) pipe) + (force-output pipe) + (let ((sym (read pipe))) + (close-pipe pipe) + (symbol->string sym)))) (with-directory-excursion (search-input-directory outputs "/lib/stex") (invoke "make" -- 2.32.0