From patchwork Sun Feb 13 21:51:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37230 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 0D08127BBEA; Sun, 13 Feb 2022 21:55:04 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 72FEC27BBE9 for ; Sun, 13 Feb 2022 21:55:03 +0000 (GMT) Received: from localhost ([::1]:57132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJMph-0005mF-Ji for patchwork@mira.cbaines.net; Sun, 13 Feb 2022 16:55:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJMoo-0005el-8X for guix-patches@gnu.org; Sun, 13 Feb 2022 16:54:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJMon-0001uf-VB for guix-patches@gnu.org; Sun, 13 Feb 2022 16:54:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJMon-0003Ei-VM for guix-patches@gnu.org; Sun, 13 Feb 2022 16:54:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH 10/11] gnu: chez-and-racket-bootstrap: Add 'chez-scheme-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Feb 2022 21:54:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org Cc: Liliana Marie Prikler , Philip McGrath Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164478921412322 (code B ref 53878); Sun, 13 Feb 2022 21:54:05 +0000 Received: (at 53878) by debbugs.gnu.org; 13 Feb 2022 21:53:34 +0000 Received: from localhost ([127.0.0.1]:39075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJMoH-0003Cf-Tf for submit@debbugs.gnu.org; Sun, 13 Feb 2022 16:53:34 -0500 Received: from mail-qv1-f43.google.com ([209.85.219.43]:46820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJMoC-0003C0-RE for 53878@debbugs.gnu.org; Sun, 13 Feb 2022 16:53:29 -0500 Received: by mail-qv1-f43.google.com with SMTP id n6so13388614qvk.13 for <53878@debbugs.gnu.org>; Sun, 13 Feb 2022 13:53:28 -0800 (PST) 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=zzxndLd3++TU95/ksnJc3+VlU1VVJv9zyyVyQPYh0hg=; b=kLH5CC0xtuNDih0aqSpqQMRiqpBmIJ4WinnDbf4nl53ku6q5kaZ7fNtbblb0tIOQEP Hs0zxRjspAP05bW7HyKleOENt2ShKYXxH6Vv1Phz7zm4ws1bo79YZqCLcOf4NBZsAG1y BtQbxF4FxKY0UpGqzUw8A0Xa6qKGQDpFX2gFZrIxaXfERTTTnoY5nu/WebUttm9iV0i4 jHrnoTMN0K8ob4PrrV/9waMqGfDpDmeuLa83oh52u7dX3fdif0a9Adaq/4+Yz8bGhzUH 6rouGze6wlcehlHohi9WXLn9IrSVlUmp+9W8p/rT8Xm/dTWC85Qamh0snf4FsD5aw3DI nbKA== 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=zzxndLd3++TU95/ksnJc3+VlU1VVJv9zyyVyQPYh0hg=; b=GnZHfgWbqB4DSUuKZQRr3evgWUhiKOAcYqvMUuOkuRI+Dyli4KadGv8kiKOTqo8GCX 7dacBcSEI4RUjNAYdQfK1G4fSUt3mVt7Z8joREKNe6pvREbrKUPtjgXcTJj0vAKAudQY rjKOjoO6pJ+ypP3+bY69CTKAasuRwOXS9Bp4p6oSSylXD7sCr6cyuF2+e+1gcPwr5Pn8 GcMLB07EOVXci6Pd8AkmjdHchhhJturV2EbMot1f+UGhLKwxn+EjQoErJ+PJ4GN28T6M 8SP2dMy+z78lnitC0lVzUD/4aTLDp5EUI1KBCUUOydnxD00cnbo3Kv288TLIeCGktsTC /cWg== X-Gm-Message-State: AOAM531Prkz9dJq5M6CRoYEo72FglLZtfL+D0TaJfkAWCGc8lk4tzZSw m+oycQneU5zq2o7HSOiEmihSjvHVTeVhL2PhSMQ= X-Google-Smtp-Source: ABdhPJyCR4sKTUrsFbxTFLXJZgv9fCkNgf5UsWd7wZToGnRoBlCoPs7rOeg4aOeL/oHZN9ow4gu/eg== X-Received: by 2002:ad4:5941:: with SMTP id eo1mr1220236qvb.45.1644789203080; Sun, 13 Feb 2022 13:53:23 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x21sm2282445qtp.67.2022.02.13.13.53.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Feb 2022 13:53:22 -0800 (PST) From: Philip McGrath Date: Sun, 13 Feb 2022 16:51:26 -0500 Message-Id: <20220213215127.218952-11-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220213215127.218952-1-philip@philipmcgrath.com> References: <20220213215127.218952-1-philip@philipmcgrath.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez-and-racket-bootstrap.scm (chez-scheme-for-system): New procedure. * gnu/packages/loko.scm (loko-scheme): Use 'chez-scheme-for-system'. * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): Likewise * gnu/packages/chez.scm (chez-srfi): (chez-web): (chez-sockets): (chez-matchable): (chez-irregex): (chez-fmt): (chez-mit): (chez-scmutils): Likewise. --- gnu/packages/chez-and-racket-bootstrap.scm | 13 ++++++++++++- gnu/packages/chez.scm | 16 ++++++++-------- gnu/packages/emacs-xyz.scm | 2 +- gnu/packages/loko.scm | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/gnu/packages/chez-and-racket-bootstrap.scm b/gnu/packages/chez-and-racket-bootstrap.scm index d2f78dfae2..669c54729d 100644 --- a/gnu/packages/chez-and-racket-bootstrap.scm +++ b/gnu/packages/chez-and-racket-bootstrap.scm @@ -45,7 +45,8 @@ (define-module (gnu packages chez-and-racket-bootstrap) #:use-module (gnu packages tex) #:use-module (gnu packages xorg) #:use-module ((guix licenses) - #:prefix license:)) + #:prefix license:) + #:export (chez-scheme-for-system)) ;; Commentary: ;; @@ -205,6 +206,16 @@ (define-module (gnu packages chez-and-racket-bootstrap) ;; ;; Code: +(define* (chez-scheme-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return 'chez-scheme' if it supports SYSTEM without restrictions; +'chez-scheme-racket-variant' otherwise." + (if (and=> (nix-system->chez-machine system) + chez-machine->upstream-restriction) + chez-scheme-for-racket + chez-scheme)) + (define (chez-machine->unthreaded mach) "Given a string MACH naming a Chez Scheme machine type, returns a string naming the unthreaded machine type for the same architecture and OS as MACH. diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index be251798c3..d5007e0cfd 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -74,7 +74,7 @@ (define-public chez-srfi (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -105,7 +105,7 @@ (define-public chez-web (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) ghostscript ;; FIXME: This package fails to build with the error: ;; mktexpk: don't know how to create bitmap font for bchr8r @@ -170,7 +170,7 @@ (define-public chez-sockets (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) chez-web (texlive-updmap.cfg (list texlive-pdftex)))) (arguments @@ -256,7 +256,7 @@ (define-public chez-matchable (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -288,7 +288,7 @@ (define-public chez-irregex (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -319,7 +319,7 @@ (define-public chez-fmt (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "chez-check" @@ -382,7 +382,7 @@ (define string->uninterned-symbol (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -413,7 +413,7 @@ (define-public chez-scmutils (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list chez-mit chez-srfi)) (arguments diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 02694b636a..f445ab0f25 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -451,7 +451,7 @@ (define-public emacs-geiser-chez (string-append "(eval-after-load 'geiser-impl '" all ")")))))))) (inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list emacs-geiser)) (home-page "https://nongnu.org/geiser/") diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm index 74a649b8a1..a7ab12a0c4 100644 --- a/gnu/packages/loko.scm +++ b/gnu/packages/loko.scm @@ -71,7 +71,7 @@ (define-public loko-scheme #t))))) (native-inputs `(("akku" ,akku) - ("chez-scheme" ,chez-scheme) + ("chez-scheme" ,(chez-scheme-for-system)) ("struct" ,guile-struct-pack) ("laesare" ,guile-laesare) ("pfds" ,guile-pfds)