From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MCTHKqFCb2AAYgEAgWs5BA (envelope-from ) for ; Thu, 08 Apr 2021 19:51:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MP2yJKFCb2D/VQAA1q6Kng (envelope-from ) for ; Thu, 08 Apr 2021 17:51:29 +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 5E0D9F992 for ; Thu, 8 Apr 2021 19:51:29 +0200 (CEST) Received: from localhost ([::1]:34790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUYoS-00056u-G6 for larch@yhetil.org; Thu, 08 Apr 2021 13:51:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUYo2-00052D-Em for guix-patches@gnu.org; Thu, 08 Apr 2021 13:51:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUYo2-0004KG-7C for guix-patches@gnu.org; Thu, 08 Apr 2021 13:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUYo2-0003i4-3e for guix-patches@gnu.org; Thu, 08 Apr 2021 13:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47661] [PATCH 01/33] profiles: Add hook for Emacs subdirs. References: <20210408174616.13112-1-leo.prikler@student.tugraz.at> In-Reply-To: <20210408174616.13112-1-leo.prikler@student.tugraz.at> Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Apr 2021 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47661 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47661@debbugs.gnu.org Received: via spool by 47661-submit@debbugs.gnu.org id=B47661.161790423814068 (code B ref 47661); Thu, 08 Apr 2021 17:51:02 +0000 Received: (at 47661) by debbugs.gnu.org; 8 Apr 2021 17:50:38 +0000 Received: from localhost ([127.0.0.1]:48161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUYnc-0003ei-U8 for submit@debbugs.gnu.org; Thu, 08 Apr 2021 13:50:37 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:6561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUYna-0003eY-QZ for 47661@debbugs.gnu.org; Thu, 08 Apr 2021 13:50:35 -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 4FGTLv3Ld8z1LWpG for <47661@debbugs.gnu.org>; Thu, 8 Apr 2021 19:50:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4FGTLv3Ld8z1LWpG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1617904231; bh=J5bj57+Yt74u733Mf6T+Jaghn2u4TETbyXrzxPV4JCg=; h=From:To:Subject:Date:From; b=QPBYa1YKo4cuQMh8M1UOeS9xmrJkTyFzqI0dpHPrhBdujY/Ey3NEJMoTTdrIe4Z1p 74HVbo/j/uFAs1QZuPuvrTmDtYx1LPBsejBo183Zw577WHMNbq0/eT3wXSm0HMwDeQ 8Zubo80O43QMqjArfLIk6Mgs0J/vzEOePoWTNWlE= From: Leo Prikler Date: Thu, 8 Apr 2021 19:49:35 +0200 Message-Id: <20210408175007.13360-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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=1617904289; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=J5bj57+Yt74u733Mf6T+Jaghn2u4TETbyXrzxPV4JCg=; b=QOo3hpnNBwsx87homMu1bRzF9Q5tNQOTjVGCR8CFiucr1AFnKMJlmrZJ+/I8hcqBRBZXUy +VFXuZwcGN4M+WjY4P0vMKS3JQ7VOs4G+NaUt412Gkefiuq0v4K1J3pN3XZ2+UZGad6RL0 uNPazm2d4QRTxN88K1V/zQAMSZb4HUz2lcFTWbtCZFsIreP/axJh+4YfJ5aAUtE+VvO8sx rZLFAa+SbPLafwdN7LV2nRkwNiJr4iAvT4a2OJNcXMqdzRbnQ0wFAxZHtVIMu20K0zKvM7 F9s7q0McJ1566160gibBQDgMkJdRbXudhcbjsGO5xlbMNiq/ZgVnIJxs2dGE7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617904289; a=rsa-sha256; cv=none; b=RolFrGDVK6O5OqYkyekU2hAl3dxy7cDMBm1CA3Z3JZ4SMuFgDYPkkojFSJ3dtXJKiAY9lG ps/TJ31OnuXaA5qQfSmXyBOq2R+q8s+J2YuDrEI8rHqMuXqpqmBLK0LWzuJ42QkntA4Tx6 uS8Vm48sp4l07s1EfCykaGOzitZru+DM03koM5LpAcTd6LG9onKTV+ijSeSsuD8r38sZML uKfefTMDZfvd8YPQ7vr3Mojg+dYLs9zgTa3YHZ9IJqbHCNUe/+kkaQcR+YsQtxAqzBoPjS UpC8XCsbMiVi36Bmn6JcVLjGRjNsq486l77/6fAokjLjtbpRG3f4bWnN+CR1cA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=QPBYa1YK; 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: 3.66 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=QPBYa1YK; 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: 5E0D9F992 X-Spam-Score: 3.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: cW13rZK/CfRj * guix/profiles.scm (emacs-subdirs): New variable. (%default-profile-hooks): Add it here. * guix/status.scm (hook-message): Add a message for emacs-subdirs. --- guix/profiles.scm | 41 +++++++++++++++++++++++++++++++++++++++++ guix/status.scm | 2 ++ 2 files changed, 43 insertions(+) diff --git a/guix/profiles.scm b/guix/profiles.scm index 67d90532c1..26fe266a61 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1115,6 +1115,46 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." `((type . profile-hook) (hook . ca-certificate-bundle)))) +(define (emacs-subdirs manifest) + (define build + (with-imported-modules (source-module-closure + '((guix build profiles) + (guix build utils))) + #~(begin + (use-modules (guix build utils) + (guix build profiles) + (ice-9 ftw) ; scandir + (srfi srfi-1) ; append-map + (srfi srfi-26)) + + (let ((destdir (string-append #$output "/share/emacs/site-lisp")) + (subdirs + (append-map + (lambda (dir) + (filter + file-is-directory? + (map (cute string-append dir "/" <>) + (scandir dir (negate (cute member <> '("." ".."))))))) + (filter file-exists? + (map (cute string-append <> "/share/emacs/site-lisp") + '#$(manifest-inputs manifest)))))) + (mkdir-p destdir) + (with-directory-excursion destdir + (call-with-output-file "subdirs.el" + (lambda (port) + (write + `(normal-top-level-add-to-load-path + (list ,@subdirs)) + port) + (newline port) + #t))))))) + (gexp->derivation "emacs-subdirs" build + #:local-build? #t + #:substitutable? #f + #:properties + `((type . profile-hook) + (hook . emacs-subdirs)))) + (define (glib-schemas manifest) "Return a derivation that unions all schemas from manifest entries and creates the Glib 'gschemas.compiled' file." @@ -1672,6 +1712,7 @@ MANIFEST." fonts-dir-file ghc-package-cache-file ca-certificate-bundle + emacs-subdirs glib-schemas gtk-icon-themes gtk-im-modules diff --git a/guix/status.scm b/guix/status.scm index 362ae2882c..2683678201 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -379,6 +379,8 @@ the current build phase." (G_ "building GHC package cache...")) ('ca-certificate-bundle (G_ "building CA certificate bundle...")) + ('emacs-subdirs + (G_ "listing Emacs subdirs...")) ('glib-schemas (G_ "generating GLib schema cache...")) ('gtk-icon-themes -- 2.31.1