From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 CHDXBXMMLWJ02gAAgWs5BA (envelope-from ) for ; Sat, 12 Mar 2022 22:11:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GAMFOnIMLWKPWwEAG6o9tA (envelope-from ) for ; Sat, 12 Mar 2022 22:11:14 +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 9383F1D5C2 for ; Sat, 12 Mar 2022 22:11:14 +0100 (CET) Received: from localhost ([::1]:58726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nT917-0005SD-3i for larch@yhetil.org; Sat, 12 Mar 2022 16:11:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT90w-0005S1-Nz for guix-patches@gnu.org; Sat, 12 Mar 2022 16:11:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nT90w-0002UD-Fg for guix-patches@gnu.org; Sat, 12 Mar 2022 16:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nT90w-0002wQ-BS for guix-patches@gnu.org; Sat, 12 Mar 2022 16:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54357] [PATCH] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. (Plugins incoming soon.) Resent-From: "(unmatched-parenthesis" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Mar 2022 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54357@debbugs.gnu.org Cc: "\(unmatched-parenthesis" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164711942011249 (code B ref -1); Sat, 12 Mar 2022 21:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Mar 2022 21:10:20 +0000 Received: from localhost ([127.0.0.1]:40935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT90G-0002vN-Go for submit@debbugs.gnu.org; Sat, 12 Mar 2022 16:10:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:49172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT90F-0002vF-6A for submit@debbugs.gnu.org; Sat, 12 Mar 2022 16:10:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT90E-0005MD-2O for guix-patches@gnu.org; Sat, 12 Mar 2022 16:10:18 -0500 Received: from knopi.disroot.org ([178.21.23.139]:55514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT90A-0002La-1X for guix-patches@gnu.org; Sat, 12 Mar 2022 16:10:16 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id ADB1740072; Sat, 12 Mar 2022 22:10:08 +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 nznIvS9fP-dO; Sat, 12 Mar 2022 22:10:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1647119406; bh=9d/snAVl28Jg00psS2cG9FkYksB/VO4ShvJmMW44Tx8=; h=From:To:Cc:Subject:Date; b=f/4anuRfYuE1AVp5QPSs2rfmMjClEaeMRfPQkY53D7N+Hmvza6fWvbfp5DIRLQW5J TyWtUU3jyS3zs/U575eDC3Mxi0ZAXBFxlTV+E343YKPA+ghhUzrx7BkSWmfwBJ0tj3 Lb+yuZeM2LrEFp9urK1cLzNTOkWUfnPL4uwt/tuEbJ6+Y5hdCL88n93oUE48OKNOG5 +sXchv+3zHD8gFpfXSmi1xiLljOvqjaR5wkqYHjpL8t0MPmPI8HE6hAKAztJ8f85w/ mg+tbHV99mLdWFMPUGt6HJFgemw6lYSDM6tO7bsPXKrGFfYyClr0mMnNE/oqKD7Jfl l0KQW7tPuwSZg== Date: Sat, 12 Mar 2022 21:09:40 +0000 Message-Id: <20220312210940.15397-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1647119474; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/CXqr+caMX5L1dFm8ESJIPU8YTgeuiet49QCz0NCYvI=; b=lGV3BnXSXfDVaCHNFmlU/+aFJn40K5c6PHi9JpYeK9/5hV88ETZIPUQoV1kDEk0Lgv5eGb Ou4P+7Nam/mniZosGpEC9Ul0rg8ZfE/aoStaQlguHtahcrTQdSCF+Vy5DqIxK3ixTnZDOR Aa+0qwHmjMUl0tZiIZdjQbyuuTMVD3BCXpg1AHt5/ocyOF/sRnHQDTJhcsSStWN7YSb2FO 20uVGeEQD0MmqiArNSD+xzXHhCHvNhcuTuSn1j5sqTCMGgfp+PpvVV0gR01NERx83HVlah 413V+THV0qKF1YZ9xWPU7DDOBioM/D5HuaX6HBbWD3JQtu86XMmpiDkcZkN5YA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647119474; a=rsa-sha256; cv=none; b=dp1pMsVdrjkPdEniCyF1QYAf/xM9BpGQRgwCeihW0QV73K3bL4PCkuJC21SlsOhEknbUqR 9nyKT3KgAUDpYQrVqOh4asPqeMP/e6VjvJiQNHBNSZhb/qHNPjSFROq/t0qCjAnWux1xNj FDWx267nk9VESODB54Q6Fec6upvwnD5YPF0Z09mWdtVQPrurSkCbbaR2gJ77eAsNDMwCag o4Ak1Sk2+AdfNcxOBWhpv/LpzO/OSKg8wtGhNPZDFmWAWSJAcDWtLJzENAT11QLtB06oTH eW4XHA8PPg9HGLxg0aTdE/LhWHOkTnaGtgoob7LBXlD252kZu53RbFag2YKeTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b="f/4anuRf"; 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.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b="f/4anuRf"; 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: 9383F1D5C2 X-Spam-Score: -3.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: XCVKZHyJhbkz * gnu/packages/text-editors.scm(kakoune): Remove the redundant `#t`s, and add a $GUIX_KAKOUNE_CONFIG_DIRS search path. While trying to package a kak plugin, I realized that the kak package itself was missing a search path. However, kak appears to allow only one config path, so I inject a for loop into the default kakrc (with a hacky substitute* because i cannot be bothered preparing a path :) which enumerates the paths in $GUIX_KAKOUNE_CONFIG_DIRS and sources all their kakfiles. I'll send in a few plugins in a moment. These will act as both examples of the search path working and of course useful packages in themselves. I also took the opportunity to clean the package up a little, removing the now unneccesary `#t`s returned at the end of each phase. I was going to change it to use git instead of github release tarballs too (I'm told that git clones are better because of Software Heritage), but I'm hesitant to make that change without checking first. --- 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..6d562d0e4a 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. ;;; @@ -187,14 +188,33 @@ (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" + (("echo \"colorscheme default\"" colorscheme-default) + (string-append colorscheme-default " +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