From patchwork Tue Oct 8 03:22:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suhail Singh X-Patchwork-Id: 36651 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 5FFC827BBEA; Sun, 5 Jan 2025 22:32:23 +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=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 DA75827BBE2 for ; Sun, 5 Jan 2025 22:32:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUZAD-00036p-Jn; Sun, 05 Jan 2025 17:32:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUZAC-00036h-5C for guix-patches@gnu.org; Sun, 05 Jan 2025 17:32:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUZAB-0006rR-3o for guix-patches@gnu.org; Sun, 05 Jan 2025 17:32:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:In-Reply-To:From:To:References:Subject; bh=0ZlKn2Hgndbawu/M/HUtuyHym9j/CljB0id0CwkGC7g=; b=sv7I65wvv8A9AI/xuMSweQm5BQ583kXNVi4aaj43rrAgmyjhKiJFXNm67JB5SvmxskG8sBT7Hrhvsgj/S+CtPySKu8M4IAwMpF81HVwvCwNCRNSlZEEqq/IjOo9C6xxEU4XGszEtKIdKJkuYg103Fj1pL6tUWXTb/Q9sSkt2UuyGpSLGQWHvgXW7plF6ZltfohIfHi6i90I9I7bbjVZ4ORSnAkCMU+2RmQ30Pio5hHKqyZTOsgHqVbCX2/4gW5dyU1kWqRPvC4puXPL32F/LwbsIsjyHZE4+MriSjYN01vBqbpR327nKWFRFGPY1tXcYlb3MkhWNNGNYOCkNT/VgUw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUZAA-00081q-Cn; Sun, 05 Jan 2025 17:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#72925] [PATCH v14 2/2] gnu: Improve user-experience for jpm. References: Resent-From: "Suhail Singh" Original-Sender: "Debbugs-submit" Resent-CC: glv@posteo.net, cox.katherine.e+guix@gmail.com, me@bonfacemunyoki.com, sharlatanus@gmail.com, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Sun, 05 Jan 2025 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72925 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 72925@debbugs.gnu.org Cc: Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart X-Debbugs-Original-Xcc: Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart Received: via spool by 72925-submit@debbugs.gnu.org id=B72925.173611627230764 (code B ref 72925); Sun, 05 Jan 2025 22:32:02 +0000 Received: (at 72925) by debbugs.gnu.org; 5 Jan 2025 22:31:12 +0000 Received: from localhost ([127.0.0.1]:35726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUZ9M-000807-2x for submit@debbugs.gnu.org; Sun, 05 Jan 2025 17:31:12 -0500 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:61440) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUZ9J-0007zu-3G for 72925@debbugs.gnu.org; Sun, 05 Jan 2025 17:31:10 -0500 Received: by mail-qt1-x844.google.com with SMTP id d75a77b69052e-467a37a2a53so169642191cf.2 for <72925@debbugs.gnu.org>; Sun, 05 Jan 2025 14:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736116268; x=1736721068; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0ZlKn2Hgndbawu/M/HUtuyHym9j/CljB0id0CwkGC7g=; b=G9SeYVfnGZtq7PxgrvBsUiOwHWPdrZAMgWlvYOG7qIVCeu1MqepTGExG5rTlP5Ojsv 7+jgOIwbEcLKZ/giLZbZJLq87fj8L4tRF09Hm33jNUpk0mDKB3LpP8MlgZEgzJAkXOZe /NkQ/vXCjMjBSlIHShr+Dq0UoxKhfr7oP7zDcwAcCnd6PqYysOxnkjnSSsDCMQ67dM6f KU0g78TVjfp4cQVqn5v/0XC/7XNMhcs3xhkPJu43ySLG8yu121IT4EEcIohqKhIXsPHJ tmG21jn1K5ZBPk29n1EU9ggv62clOyLro3tbS9legTO0QgCdlmK+/YF3lhhZ6teWIICm eLww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736116268; x=1736721068; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0ZlKn2Hgndbawu/M/HUtuyHym9j/CljB0id0CwkGC7g=; b=KCCcPF4F1e7P29GLDuDtYIBfu1BwL5lQzf6yvaD74TyoEhR6r7ZVoTUnSFq8OI+3wd uTUMzOfSp+ElQWuzwSYP7E1qqJpp4SVcZwFQF52igiy2FNY40HlPxgwob1QRr7VtxwKp pR2P38mmQfCVztKKAODn6glLI9dbxRe5/NHrM9eg6ORqcYNwXLf1t5ywZUG/f7y4EzQM EyVGkyfvAapE71A+ttY30419z+QWajQfQs/l9JuVVb44hGDnZqEeUDb3kAaJtymanKOo WV/k6QpTitUortIBcKD0IxCaZAGYJEKoGNAr/m/Bnolov0+JFKQdlUaOcwtikz/eMqFf dUhQ== X-Gm-Message-State: AOJu0Yy9fi/T6HVnQU0qtc5Xc1XrerJzD2KUdtSG7knGeuE6n0FkmKcI 9Qr9f5tIavRjwkqqrCNT12+x1kj4dNHGDkOlrPZDwBm9sLBLyMScnsNcnWkj X-Gm-Gg: ASbGnctFGBwFS9qgKwhxqtGBtwKZvdqQxJ6UkvmZG8IH4rd58WDF03lM/OYeEoLIhvM XCd0M1OXBifWaOUHEykUT2ExCMs2kDmjrg31El5l7hg036dRv1d2MvbOUB6/pVOmoggfg1niDp0 PRXMEYZ50Ufa+kQ1cZYAcqIJr2YKIrMhK0rwG6Cjm//iXm4wlvZsOtAhVuDGWalpkrWsMWU4Wto xmGe2r6OCYxjYYpQyKHvSa8gPV7Re0dgbyh1RGv0wUzeQxoHHMA X-Google-Smtp-Source: AGHT+IEAnORCsJXeqsMmHyGM0zuFpGNXHAUpd8Hk81GhnObYNFTIMtoWC8+1Zhb5m/qHEYeoMelQpQ== X-Received: by 2002:a05:622a:14c:b0:460:aa51:840a with SMTP id d75a77b69052e-46a4a9a2914mr736728261cf.45.1736116267751; Sun, 05 Jan 2025 14:31:07 -0800 (PST) Received: from gnus ([70.26.179.129]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46a3e67773esm169676501cf.21.2025.01.05.14.31.06 for <72925@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 14:31:07 -0800 (PST) From: "Suhail Singh" In-Reply-To: Date: Mon, 7 Oct 2024 23:22:13 -0400 Message-Id: <68d09c78846a198ba4499f89f53e4b3782208c9d.1736116108.git.suhail@bayesians.ca> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lisp.scm (jpm): Ensure jpm respects JANET_HEADERPATH and JANET_LIBPATH if set by user. Ensure gcc/g++ is able to find header files and compilation-related utilities. Change-Id: Ic7218dbd10e6fabddded50894b82492de8cabc88 --- gnu/packages/lisp.scm | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index f99ad68828..eb3063d3d9 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -30,6 +30,7 @@ ;;; Copyright © 2024 bigbug ;;; Copyright © 2024 Ashish SHUKLA ;;; Copyright © 2024 Omar Bassam +;;; Copyright © 2024 Suhail Singh ;;; Copyright © 2024 David Pflug ;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; @@ -965,22 +966,39 @@ (define-public jpm (setenv "PREFIX" #$output))) (replace 'install - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (for-each (lambda (dir) (mkdir-p (string-append #$output "/" dir))) '("lib/janet/jpm" "share/man/man1")) (invoke "janet" "bootstrap.janet" "configs/linux_config.janet") - (wrap-program (string-append #$output "/bin/jpm") - `("JANET_HEADERPATH" ":" = - (,(string-append #$janet "/include/janet"))) - `("JANET_LIBPATH" ":" = - (,(string-append #$janet "/lib"))))))))) + (let ((gcc-toolchain (assoc-ref inputs "gcc-toolchain")) + (core-min (assoc-ref inputs "coreutils-minimal"))) + (wrap-program (string-append #$output "/bin/jpm") + `("JANET_HEADERPATH" ":" prefix + (,(string-append #$janet "/include/janet"))) + `("JANET_LIBPATH" ":" prefix + (,(string-append #$janet "/lib"))) + `("C_INCLUDE_PATH" ":" prefix + (,(string-append gcc-toolchain "/include"))) + `("CPLUS_INCLUDE_PATH" ":" prefix + (,(string-append gcc-toolchain "/include/c++") + ,(string-append gcc-toolchain "/include"))) + `("LIBRARY_PATH" ":" prefix + (,(string-append gcc-toolchain "/lib") + ,(string-append gcc-toolchain "/lib64"))) + `("PATH" ":" prefix + (,(string-append gcc-toolchain "/bin") + ,(string-append core-min "/bin")))))))))) (inputs (list bash-minimal coreutils-minimal curl gcc - git-minimal/pinned)) + git-minimal/pinned + ;; Lazily resolve the gcc-toolchain to avoid a circular + ;; dependency. + (module-ref (resolve-interface '(gnu packages commencement)) + 'gcc-toolchain))) (propagated-inputs (list janet)) (native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))