From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4APeMwBxY2CdrwAAgWs5BA (envelope-from ) for ; Tue, 30 Mar 2021 20:42:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ICDELQBxY2DRdgAA1q6Kng (envelope-from ) for ; Tue, 30 Mar 2021 18:42:08 +0000 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 79D5410AAB for ; Tue, 30 Mar 2021 20:42:08 +0200 (CEST) Received: from localhost ([::1]:57654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRJJX-0007aU-L0 for larch@yhetil.org; Tue, 30 Mar 2021 14:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRJJS-0007Yc-Fm for guix-patches@gnu.org; Tue, 30 Mar 2021 14:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRJJS-0006Ea-7B for guix-patches@gnu.org; Tue, 30 Mar 2021 14:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRJJS-0001J4-5N for guix-patches@gnu.org; Tue, 30 Mar 2021 14:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43627] [PATCH] gnu: emacs: Wrap EMACSLOADPATH. References: <87blhtt6d6.fsf@gmail.com> In-Reply-To: <87blhtt6d6.fsf@gmail.com> Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Mar 2021 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43627 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47458@debbugs.gnu.org Cc: 43627@debbugs.gnu.org, maxim.cournoyer@gmail.com Received: via spool by 43627-submit@debbugs.gnu.org id=B43627.16171296744949 (code B ref 43627); Tue, 30 Mar 2021 18:42:02 +0000 Received: (at 43627) by debbugs.gnu.org; 30 Mar 2021 18:41:14 +0000 Received: from localhost ([127.0.0.1]:52844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJIf-0001Hk-OH for submit@debbugs.gnu.org; Tue, 30 Mar 2021 14:41:14 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:15957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJId-0001HX-1l; Tue, 30 Mar 2021 14:41:12 -0400 Received: from localhost.localdomain (194-96-13-79.adsl.highway.telekom.at [194.96.13.79]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4F8yvR2Cslz1LBCm; Tue, 30 Mar 2021 20:41:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4F8yvR2Cslz1LBCm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1617129667; bh=7uzYIr/g2JWp7ftiSJnxYlW1HtH3rhTaf8IVI3DMKN8=; h=From:To:Cc:Subject:Date:From; b=SNCqXO86kqCTYWoN/vIMMxJqrn3CQfAdZUtQ7Hg35iSrdPpCUYBuF6zW/wbA9hzwH +vmfcbPu8t4dGu4jfDwZJvQOo7aj0wG3aQnfmF5xtmB/OfLP9LzRVa6daWoUs14PE5 vD5fHvQHghvIJf65GLdxwyqxrZspBG5IqAynPr0Q= From: Leo Prikler Date: Tue, 30 Mar 2021 20:41:01 +0200 Message-Id: <20210330184101.7643-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617129728; 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=7uzYIr/g2JWp7ftiSJnxYlW1HtH3rhTaf8IVI3DMKN8=; b=hWMKiT7iJ59DHRh5Srm9+ze7TKYlwZ1aZc0j+MSpGgSehN80YnZiUXAPbsTSJDVASw8VGz kgu5k529v4hkZUFY68SKmEUcuYTWc9zq2bgWzRwdHCqOHS4EVkJegCSGaXsocit8s8CgwI eDZxo7932Zaq6ymsMJIJS3I1BDY0sCa2kI0vEZzuZjB9YmNeto0bSeaQKfbmcvga92YfK6 9f9P1Kvbad8txrhYjsvHm0GkY7anyCqjbEYxoBLARvlOeNMIeXRNOmvOaAPc5mLIv/u408 lKaveIC7PJjr+p/ynGZH0Jpr0JoBRgYzAPW5F0FfhEiMpjVfpnU05fkI8HSn8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617129728; a=rsa-sha256; cv=none; b=g3mestH+xPQA6NDgS9gSzl4SmBnN2260r1lSedaxHvnA2gxtXDMYaOKHgTWl36UU16A3KI 0uCMvn5lPCThR9Y4pXXTTJeuJ9lj+B7z/rGc6Y2G5N+DDx3pR8dGGM+NmqNAbX4Ntys1vb I8uUZmIurPtLbSb7hXjhGvK8w8SSz5VZw4Fy7X+prrh+I4NuNVo15tCpC1yjESxFq+MsDE s0mwpZ8XEU/JNfpWQU/1VNLXX053e1RN9mh+k55SJsQYn3Lk2e9kmrrOmRkubKeZV7UZ+B ijTNpf/oHbtD1xUuV4I0GDyWe9NEA9cuqfJfLrjStuOpVZnzRWOybrwS73dJ/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=SNCqXO86; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=SNCqXO86; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 79D5410AAB X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: vgACYkfQVQHz With this, the search path specification of EMACSLOADPATH does no longer depend on the version of Emacs, which should make upgrading major versions less painful. See also: - - * gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘wrap-load-path’. [native-search-path]: Do not search for builtin libraries. (emacs-next)[native-search-path]: Inherit from emacs. --- gnu/packages/emacs.scm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7447cfe33a..e12c489f8d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -201,6 +201,20 @@ (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) "bin/emacs") #t))) + (add-after 'strip-double-wrap 'wrap-load-path + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lisp-dirs (find-files (string-append out "/share/emacs") + "^lisp$" + #:directories? #t))) + (for-each + (lambda (prog) + (wrap-program prog + `("EMACSLOADPATH" suffix ,lisp-dirs))) + (find-files (string-append out "/bin") + ;; versioned and unversioned emacs binaries + "^emacs(-[0-9]+(\\.[0-9]+)*)?$")) + #t))) (add-before 'reset-gzip-timestamps 'make-compressed-files-writable ;; The 'reset-gzip-timestamps phase will throw a permission error ;; if gzip files aren't writable then. This phase is needed when @@ -255,9 +269,7 @@ (native-search-paths (list (search-path-specification (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" version "/lisp")))) + (files '("share/emacs/site-lisp"))) (search-path-specification (variable "INFOPATH") (files '("share/info"))))) @@ -294,18 +306,7 @@ languages.") "0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3")))) (native-inputs `(("autoconf" ,autoconf) - ,@(package-native-inputs emacs))) - (native-search-paths - (list (search-path-specification - (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" - (version-major+minor+point version) - "/lisp")))) - (search-path-specification - (variable "INFOPATH") - (files '("share/info")))))))) + ,@(package-native-inputs emacs)))))) (define-public emacs-next-pgtk (let ((commit "ae18c8ec4f0ef37c8c9cda473770ff47e41291e2") -- 2.31.0