From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WP+YCm+ekWWPJAEAkFu2QA (envelope-from ) for ; Sun, 31 Dec 2023 18:01:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id wDNmBW+ekWXy6wAAe85BDQ (envelope-from ) for ; Sun, 31 Dec 2023 18:01:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="k/n0MMBi"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704042094; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=dAN0drCmaN/D4cfuawsBPKwMOxpOynhCpakag9gUIWg=; b=YaxnI+gn+/cXuj6qmHo/o2dpeG/YMURxpMmgZ8DDXlv+PmJgO8gI999IVDRac6bMSrehrv Qu9BKXhsdHn65PsHjWmi3nnY6SMLJNvSwuRUsu5nEX6pzJUdoVk+g9xLjPi5Jhet3gRApr Xzox9biwVw1w8VKZIl3551ocqcOVMCDG2nxEIZ0GRyGNdh2ORunSR/sSL/lgUSai3ZHT0B Mp798/H6qNDQwbDFxCnF0NbSx5a6dil/JNJNogNP+CgtKKWYFTHXOLL9IG5tqQLtLozm/8 cpR1SyzmI1F4TZTcKbXhbs5IW898y/D7iW8LQAC/+liq7xIgqOGaNaGJn4//VQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="k/n0MMBi"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704042094; a=rsa-sha256; cv=none; b=pVGqmX20ugFW3iUbxVh/jhMO5ek75BZdSWOs42z+lheTdfmvhwXBfboJhXw3Mg1cRpPO+Y qZYHb6ultiE16aquvfs08iRYmDHviZFrbSPqBKUZGcZnINI3ikDfVkErqxkZtCVXjUw7n2 zkJoTx7CsrEr5NyvSf4zpB1XXs2lybHgl8ZNgMGnXSxacwHiN8ACXQ6G5nyR9dG/RUaXud VW+k7YPGqHVBLeeOXO8lPlu2+kfTmE7kyYBWeVUDamW52syl+s1otDPRHBO4T42EFWv1Wp +uirLSToRqamziEviEtM3f7VNXGfWXlmOVwjlK0lFHEmLNjnuLRcam1eyVp/hQ== 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 D038369BD1 for ; Sun, 31 Dec 2023 18:01:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJzAT-0001IE-Ig; Sun, 31 Dec 2023 12:00: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 1rJzAQ-0001HV-H4 for guix-patches@gnu.org; Sun, 31 Dec 2023 12:00:02 -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 1rJzAQ-0005Ck-6e for guix-patches@gnu.org; Sun, 31 Dec 2023 12:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJzAQ-0000V7-Tl; Sun, 31 Dec 2023 12:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68180] [PATCH 1/4] gnu: emacs: Add awk, find, sed and sh to PATH wrapper. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Sun, 31 Dec 2023 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68180 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68180@debbugs.gnu.org Cc: Maxim Cournoyer , Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by 68180-submit@debbugs.gnu.org id=B68180.17040419841834 (code B ref 68180); Sun, 31 Dec 2023 17:00:02 +0000 Received: (at 68180) by debbugs.gnu.org; 31 Dec 2023 16:59:44 +0000 Received: from localhost ([127.0.0.1]:46958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJzA8-0000TR-6x for submit@debbugs.gnu.org; Sun, 31 Dec 2023 11:59:44 -0500 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:45209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJzA5-0000TB-Up for 68180@debbugs.gnu.org; Sun, 31 Dec 2023 11:59:42 -0500 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-67f8d9fe99fso64062466d6.2 for <68180@debbugs.gnu.org>; Sun, 31 Dec 2023 08:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704041975; x=1704646775; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dAN0drCmaN/D4cfuawsBPKwMOxpOynhCpakag9gUIWg=; b=k/n0MMBiDEW5xMewLRa5hmfBONS/Ehu685/rnv25RlJMLbkoFkKVBplyhKm0y/RXy6 iN2D0SL1XnkDfmhp5XkJTKyMD/rsVQZobA6jB38volR9NJF8cYI0kyvzwgyWevL5ijeS 1TYZY3g1GpaTGruSQGg/a1qTavkaqhMfk77Qb2Gf2FFpPZGS6NFqoWiyF+li5U9dlmT7 89bozjayHcIvlJG0m0FaKB2tru4Mi5GIRmGsv5T8ltmGhwkRi86Oaq572NLzm6FIBDQI +LZ1cSIt4/jxJPdR/Dg+qpNH5lHTlL2Z89+KIP0qYdG6Ntsl2mUBLOlG33Qx1oVN6yDp LD2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704041975; x=1704646775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dAN0drCmaN/D4cfuawsBPKwMOxpOynhCpakag9gUIWg=; b=bWD++4zySi/XIXpiwnPtjL5vRXnL6wzQvC+D22FFy9IgEpBmngBtf3EJC768v/qYi/ jxz73zmTMSjPGVX1Q8qeG2ixGDvfjes1fxCobJA/+KZtU3MgXQgplGJRQnGB0QxmLZXA KYcRASzSlRgFtTjyCcaASxh9pQGrOC7Pf6affqOZUacd/EQTa0PHKK+pQh1EWKq8kFBN 2Ufo4f9z+T7HFe1PhurnzkQR1W0kQZ4j+ouffDmRakoSq6DMRsp3d0dDpJiv+FP3Mxtu G2rOhWjLaitO6lSYfH+pyho2b0t3bd2nOT3e48pSBcY5t+8hwtgDChPqo0nI40HuknsP eeAw== X-Gm-Message-State: AOJu0Yx6wn5qbf/moGV7KUzQrPju0qEMZEuS699bz0ISTnEPndT30ptK uMg5wUhmQe5hf3xcQ4bSGXEjAppyXLM= X-Google-Smtp-Source: AGHT+IEKBLLv9+Du1Qjd7MZlGH6KbQzDQvBYzcGK47iuhFY78xOb5cpQfTTT+C456yd6GZSrim6SQw== X-Received: by 2002:a05:6214:226d:b0:67f:494b:c1f8 with SMTP id gs13-20020a056214226d00b0067f494bc1f8mr19971376qvb.32.1704041974722; Sun, 31 Dec 2023 08:59:34 -0800 (PST) Received: from localhost.localdomain (dsl-10-141-187.b2b2c.ca. [72.10.141.187]) by smtp.gmail.com with ESMTPSA id o8-20020a0cecc8000000b0067f37d9196esm8794075qvq.93.2023.12.31.08.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 08:59:34 -0800 (PST) From: Maxim Cournoyer Date: Sun, 31 Dec 2023 11:59:06 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.67 X-Spam-Score: -3.67 X-Migadu-Queue-Id: D038369BD1 X-Migadu-Scanner: mx10.migadu.com X-TUID: S40Yfnk5DG8i Before this change, using Emacs in a pure environment, e.g. 'guix shell --pure emacs', would cause problems such as: jka-compr-insert-file-contents: Uncompression program ‘sh’ not found And other problems were found requiring the other tools. While the above could be patched in place for 'sh', it seems more robust and universally useful to have the commands appear on PATH, should other Elisp modules want to call to these directly as well. * gnu/packages/emacs.scm (emacs-minimal) [arguments] : Adjust the wrap-emacs-paths phase to wrap additional inputs. [inputs]: Add findutils, gawk and sed. (%emacs-modules): Add (srfi srfi-26). Change-Id: Ifb4fe2fc12ddc9eae387adb3da3f7821fab78e65 --- gnu/packages/emacs.scm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b9d9e2b891..85d40d01de 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016 David Thompson ;;; Copyright © 2016 Nikita ;;; Copyright © 2017 Marius Bakke -;;; Copyright © 2017, 2019, 2020 Maxim Cournoyer +;;; Copyright © 2017, 2019, 2020, 2023 Maxim Cournoyer ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017, 2018 Ricardo Wurmus ;;; Copyright © 2017, 2023 Janneke Nieuwenhuizen @@ -59,6 +59,7 @@ (define-module (gnu packages emacs) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages fribidi) + #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gd) #:use-module (gnu packages gettext) @@ -94,6 +95,7 @@ (define (%emacs-modules build-system) `((guix build ,(symbol-append which '-build-system)) (guix build utils) (srfi srfi-1) + (srfi srfi-26) (ice-9 ftw)))) (define-public emacs-minimal @@ -231,12 +233,17 @@ (define-public emacs-minimal (wrap-program prog ;; Some variants rely on uname being in PATH for Tramp. ;; Tramp paths can't be hardcoded, because they need to - ;; be portable. + ;; be portable. "sh", "find", "awk" and "sed" are also + ;; needed by common Elisp modules e.g., for reading + ;; documentation, so have them on PATH. `("PATH" suffix - ,(map dirname - (list (search-input-file inputs "/bin/gzip") - ;; for coreutils - (search-input-file inputs "/bin/yes")))) + ,(map (compose dirname (cut search-input-file inputs <>)) + (list "bin/awk" + "bin/find" ;findutils + "bin/gzip" + "bin/sed" + "bin/sh" ;bash + "bin/yes"))) ;coreutils `("EMACSLOADPATH" suffix ,lisp-dirs))) (find-files (string-append out "/bin") ;; Matches versioned and unversioned emacs binaries. @@ -254,7 +261,7 @@ (define-public emacs-minimal (copy-file (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) "bin/emacs"))))))) - (inputs (list bash-minimal coreutils gzip ncurses)) + (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed)) (native-inputs (list autoconf pkg-config texinfo)) (home-page "https://www.gnu.org/software/emacs/") (synopsis "The extensible text editor (minimal build for byte-compilation)") -- 2.41.0