From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QLc5FXBtLmIlaQEAgWs5BA (envelope-from ) for ; Sun, 13 Mar 2022 23:17:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iBe9EXBtLmKxAgEAauVa8A (envelope-from ) for ; Sun, 13 Mar 2022 23:17:20 +0100 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 E114B3C161 for ; Sun, 13 Mar 2022 23:17:19 +0100 (CET) Received: from localhost ([::1]:50562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTWWc-0006kG-Es for larch@yhetil.org; Sun, 13 Mar 2022 18:17:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTWWM-0006id-U5 for guix-patches@gnu.org; Sun, 13 Mar 2022 18:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTWWM-0001ru-LQ for guix-patches@gnu.org; Sun, 13 Mar 2022 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTWWM-0008Ox-Cc for guix-patches@gnu.org; Sun, 13 Mar 2022 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54357] [PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. References: <20220312210940.15397-1-paren@disroot.org> In-Reply-To: <20220312210940.15397-1-paren@disroot.org> Resent-From: "(unmatched-parenthesis" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Mar 2022 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54357@debbugs.gnu.org Cc: "\(unmatched-parenthesis" Received: via spool by 54357-submit@debbugs.gnu.org id=B54357.164720978032182 (code B ref 54357); Sun, 13 Mar 2022 22:17:02 +0000 Received: (at 54357) by debbugs.gnu.org; 13 Mar 2022 22:16:20 +0000 Received: from localhost ([127.0.0.1]:43492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTWVg-0008Mz-II for submit@debbugs.gnu.org; Sun, 13 Mar 2022 18:16:20 -0400 Received: from knopi.disroot.org ([178.21.23.139]:49472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTWVe-0008Mp-CC for 54357@debbugs.gnu.org; Sun, 13 Mar 2022 18:16:19 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 84F89400B4; Sun, 13 Mar 2022 23:16:16 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Iq33NBdVNldh; Sun, 13 Mar 2022 23:16:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1647209775; bh=8rhHHU0T4dMPWgM9kazsRPokLQiZxZUkE8i6q2+nXhs=; h=From:To:Cc:Subject:Date; b=Kndc15rNqsvSVIf+PyHnngvPMwnRO5LurlWpt1kklIspeLkvxYGSbJORqPdDOIQ49 sjE0Z6qLGqSIOnpBP7O9wzBK5Ob8pVf2pOGC2lZj+PLuFEUMyf7C0Hciu/It6Kvlg2 cDi6mNE7j4JtUwKpxWM/ytW0TLrolynl3cwuF22UOk9boHoPBU+wno+8ci7tjIs+Ql o+F6pjWR1StcMjxEUUKJmIPzkQxebocgfEs2quHeMxSDOpJUfC7aqv2VwWYbFDMbWc rmXyw0rhZfNpPl+DbLXhA15mJMD6NxaDavbVqdaSnKobJh+goBh8wRg3ogKZD/iltG pTFz4WocXGBAw== Date: Sun, 13 Mar 2022 22:16:01 +0000 Message-Id: <20220313221604.7686-1-paren@disroot.org> 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" Reply-to: "\(unmatched-parenthesis" X-ACL-Warn: , "\(unmatched-parenthesis via Guix-patches" From: "\(unmatched-parenthesis via Guix-patches" via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647209840; h=from:from:sender:sender:reply-to: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=xkdLoZRRXJ5+q12WUhA1lwsKhgANJxDdcoXnJbO8ra4=; b=oD+it9cNOug9mNCbLNP0cnpwvzhDb6j9S8ObWKPstbZZXNZ/ZsI4XSZBsm6qBH38CfI72x G3elEC9GwDKr+sdwNAF2iyzzNR7sHgA4gy3feG4/E5tphVJqsqwuMxVBG1vy+dH+D7atN0 R3lyczyxPlsadBuOjdpqYhTQbF3fAinXbppyCRtZB3Vkt3bJa4m9PyrjakhcDQSG8SSNIM sPjwfu8D+ljfNmH8MkVTOZdHMITBiT9z4GE9ybwChosULA6NUoWMZbUiNdk/Ox6dqVwKW1 TVvrAP5jkNzkXEn4sR2fJQBUSZF031HqxMjChjqkpx2B8bdbUFsIhqWiuCeGDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647209840; a=rsa-sha256; cv=none; b=HxsE7WjaFvYLwZC8x6re1DqvyNu7WModr/ijA4+MEKCI30f2BCCd3EZ5yGXXbsN6pT7mNJ gEvrBAsJ77e/bgOMZ33Yi20riMEXPkHhfq4AtkuG7aIY4UaZ0uljcxEhYup4/4fwYmk1Zc 95ZxpxwealDrvc/Q4Znz18z94Ux8s2qpLT0ImMHyeCU4LJaRDdXqXw7vqDlSdmO7rT8JPI vbXsRCXxVIf5zu3zFQYkAU319/10zC3UriMeHA9krFNGyndK0p+6JhUnDK+ldybgm0buUO XqcTLzbt+Zb3ssbQDUApac4SkKuq6ZJMRVI4KNT5vqOSGjF5Rbfyx2fqZ3LToQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Kndc15rN; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Kndc15rN; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: E114B3C161 X-Spam-Score: -3.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: UTDSuT5rlHqc * gnu/packages/text-editors.scm(kakoune): Clean up package recipe, and add GUIX_KAKOUNE_DIRS search path. Argh! That for loop makes kak source the default kakrc twice! This rebased patch series fixes that. (I also added copy-build-system to use-modules so that we can install kak plugins properly, which was missing from my patch. I didn't notice it while I was doing `git add -p` :)) --- gnu/packages/text-editors.scm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 45cc61765a..96e070807d 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Leo Famulari ;;; Copyright © 2021 Pierre Langlois ;;; Copyright © 2021 Calum Irwin +;;; Copyright © 2022 (unmatched parenthesis ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,7 @@ (define-module (gnu packages text-editors) #:use-module (guix utils) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system python) @@ -187,14 +189,32 @@ (define-public kakoune (substitute* "src/shell_manager.cc" (("if \\(m_shell.empty\\(\\)\\)" line) (string-append "m_shell = \"" (which "sh") - "\";\n " line))) - #t)) + "\";\n " line))))) (delete 'configure) ; no configure script ;; kakoune requires us to be in the src/ directory to build. (add-before 'build 'chdir - (lambda _ (chdir "src") #t))))) + (lambda _ (chdir "src"))) + (add-before 'install 'patch-kakrc + (lambda _ + (chdir "..") + ;; here, we modify the default kakrc to source all the $pkg/share/kak/autoload/*.kak + ;; files automatically. + (substitute* "share/kak/kakrc" + (("if \\[ -d \"\\$\\{kak_config}/autoload\" \\]; then .* fi") + "\ +for dir in $(echo ${GUIX_KAKOUNE_CONFIG_DIRS} | sed 's/:/\\/autoload /g'); do + if [ -d ${dir} ]; then + autoload_directory ${dir} + fi +done"))))))) (native-inputs (list asciidoc pkg-config ruby)) + (native-search-paths + (list (search-path-specification + ;; kakoune only supports one config dir, so we use this instead, so that we can + ;; modify the default kakrc to source all the autoloads. + (variable "GUIX_KAKOUNE_CONFIG_DIRS") + (files '("share/kak/"))))) (synopsis "Vim-inspired code editor") (description "Kakoune is a code editor heavily inspired by Vim, as such most of its -- 2.34.0