From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8Fj0NTwce2ARMwEAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 19:34:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oANTMTwce2BoaAAAbx9fmQ (envelope-from ) for ; Sat, 17 Apr 2021 17:34:52 +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 6BC3F17C42 for ; Sat, 17 Apr 2021 19:34:52 +0200 (CEST) Received: from localhost ([::1]:55528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXoQy-0000Tz-Re for larch@yhetil.org; Sat, 17 Apr 2021 13:08:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXoQO-0008Dx-6I for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXoQM-0000Cw-Hc for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXoQM-0005aP-AK for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47661] [PATCH v2 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: Sat, 17 Apr 2021 17:08: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.161867923321111 (code B ref 47661); Sat, 17 Apr 2021 17:08:02 +0000 Received: (at 47661) by debbugs.gnu.org; 17 Apr 2021 17:07:13 +0000 Received: from localhost ([127.0.0.1]:44285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXoPY-0005UN-KF for submit@debbugs.gnu.org; Sat, 17 Apr 2021 13:07:12 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:50081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXoPW-0005U7-Py for 47661@debbugs.gnu.org; Sat, 17 Apr 2021 13:07:11 -0400 Received: from localhost.localdomain (194-96-9-9.adsl.highway.telekom.at [194.96.9.9]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FMzyg3Pqnz1LLyL for <47661@debbugs.gnu.org>; Sat, 17 Apr 2021 19:07:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4FMzyg3Pqnz1LLyL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1618679227; bh=J5bj57+Yt74u733Mf6T+Jaghn2u4TETbyXrzxPV4JCg=; h=From:To:Subject:Date:From; b=SJRPjJGHhWc5F6vmz1FFZCu9nBNuGlvRxV3sR2nXXwqUCfBsol2146B9lq+OqNCo8 yPJ7z6jy5Vxc5BorRZfiJXqzEOmtHv3K0vqwkbfibxr57V793vlr8MrUTnohip164G IvNjl+Q1Ygkk7TkF1Rrj1z7jFi62OAWRk0VGaR9M= From: Leo Prikler Date: Sat, 17 Apr 2021 19:06:16 +0200 Message-Id: <20210417170648.3810-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=1618680892; 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=FMRLB9Jj4+6o4gnfo29e8aUEt0gtZgq8m/m6MVNDUj6QWqqOxOBYcUjGuGVysTQ8lLxNVP UGrEmb78yIULfRWUp6sG3cGAsT4C52oRVfKgc9hlsP3lbXSfZVd4kE++Sc0+aFGvcseOwb OFCdzsAKwNtkX/aRFDBpMdJPzj9zq59EXGjCm8kNOPLCnSRZ7wyunu6cRbMXqF0lBDUI82 NHUf/ReYzXPm6ga1l0S3LUnCjxXXH974+Hmsc8PJ478MO80JbzJoB0Hax8aajafWy92rnt KkuYv3RpDKESrw3nR3ncMaIk2RCXa3ZtV95DKR2P95uAvMM4q1KQSQTXbEKL0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618680892; a=rsa-sha256; cv=none; b=Ckpc/2zzyW5kSo6gvxxH8EIUHHdx39JdV3EQhr9WTmiFU+CX6meB1dHfZjfltDK2Z2iGCD HoJ/Aav/k5/PzShjx1tFekXk5/+XiBaHf2yHcGwhr0mpNdwbJBGHBTjqCckandKPjKGRjS yrX58WMOEuy24I8AbdGzic2QO/s6SSDSNAIHOzrBHPHW4a4MOKav/PiF7Kg6Y6Sc/wAjSQ EdxllF0vnxRa/yoUEkBzd6HV42nXm/whP9O4aqiM6WQoUEj7oVWpQB9VD0t3I6Cb8dqDP4 JuL3SJlmJlZ0CWFJ8Gq+EJ89zBabyOE2FzX9vqn/tERHwzcRAlIgdo/Iv6nz4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=SJRPjJGH; 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: 5.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=SJRPjJGH; 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: 6BC3F17C42 X-Spam-Score: 5.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: +gUTKSDtn/Mx * 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