From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id APd4NafdJ2e+nAAAqHPOHw:P1 (envelope-from ) for ; Sun, 03 Nov 2024 20:31:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id APd4NafdJ2e+nAAAqHPOHw (envelope-from ) for ; Sun, 03 Nov 2024 21:31:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QPGjhFpE; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=gWoAW0r+; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730665895; a=rsa-sha256; cv=none; b=SFczfOjEP780VyA303rCfKiT78vDYktS5dkqNyVGOItqByWqEOgw4M04mqDarvGGPhZiUY cjX/5PIxvkgv6d88iJuAzh9wPQyQMT6dsPqddUR0ASq1mGhTneLBJi31wXNd8UhYyBy4yp Quyi+XEZDfRlWjFgRzoPLvvfXbRARqwjuZ0WS4PKmeA0qdm/66SZRNTExcztx0dN6FHYX2 vHV6WqyHb/uaajwGCTJoflpl7GJy//TchuTXEA321MLs4pEPSSC7LeLZJyZQC2YrGP+TgQ /ieJYsDCvHuzJAm0V/rD2HD3dx6QvYmo7evtki7xVNuyai29ps6aCi69uHqO8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QPGjhFpE; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=gWoAW0r+; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730665895; 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=dAizG5HSuOC1Ue4CPHP+FVfOuK2UJhLY6/l9PVKKDKU=; b=DHqsG0fuPCJ9om0T7StvC3QrOmMty1BPbq0Gf1TX4SDs80+DMn5z1ncckEVhUoIlHUIKar 1aiqRq2sPrGUxv0/t+y4wO/TB7j2Mvnw8JgXm+1FxnawBDCPLDvnB2OO/oo3QRuoMQl0JB KyMFgHWN1/J7n5uOaKFPUu7KGkmPfuLxF1kSIDZTLyLXtYk3WdwjSfUfkZ4ldGMSNhCymg tvCt+s0tsmTwKfITMV6VNuTMnFlLBRhZW81D18HuZ9OtwxU7UMjg67UPDlIFp2a3aMd2Mt c3A8u/RL/JbSjkXhMXgw2cN4zrij2ZQ/lboqSHqKWC2VaKIbYaPr3uefoHqeGQ== 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 E2AC587D67 for ; Sun, 03 Nov 2024 21:31:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7hFa-0007xS-43; Sun, 03 Nov 2024 15:31:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7hFW-0007x3-Vo for guix-patches@gnu.org; Sun, 03 Nov 2024 15:31:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7hFW-0002Wb-Mu for guix-patches@gnu.org; Sun, 03 Nov 2024 15:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=dAizG5HSuOC1Ue4CPHP+FVfOuK2UJhLY6/l9PVKKDKU=; b=QPGjhFpEgeIvCnEEvrWf+j2baJ1np1Ly6YUeN62qLfA1UAXloeylfz08z2QV7/asD76jc3Jw6sEAQiR9kWmVYoqPzTQqACOR7XMMEDCtjb0gC8xSHn5gxkDX2BWgGQKGT4polyL/1sbbZL3Py73QEs+Nlwr2lTTywKfhaNDMR4TR1cfLgicauxbMErfh4KxkyRAiaz93ixVAlEujCtAx/1dWcs70jrmrCuxH9ul2eOnEMgShbCLpAuDdjiKmQvFcA/8kkXS1pD/sOh7Wf0tdSN9tznus+yJR5SPjomzCYx9sQCnQeqOrkGI907YfJ4lv1SFWbf9od9d4y+0BRrkRHQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7hFW-0003zC-An for guix-patches@gnu.org; Sun, 03 Nov 2024 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Nov 2024 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74158 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lee Thompson , 74158@debbugs.gnu.org Cc: Lee Thompson Received: via spool by 74158-submit@debbugs.gnu.org id=B74158.173066583715306 (code B ref 74158); Sun, 03 Nov 2024 20:31:02 +0000 Received: (at 74158) by debbugs.gnu.org; 3 Nov 2024 20:30:37 +0000 Received: from localhost ([127.0.0.1]:34500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7hF6-0003yo-Gy for submit@debbugs.gnu.org; Sun, 03 Nov 2024 15:30:36 -0500 Received: from 20.mo581.mail-out.ovh.net ([46.105.49.208]:56429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7hF2-0003yi-GX for 74158@debbugs.gnu.org; Sun, 03 Nov 2024 15:30:35 -0500 Received: from director10.ghost.mail-out.ovh.net (unknown [10.108.9.41]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 4XhR7B6FTrz1GJC for <74158@debbugs.gnu.org>; Sun, 3 Nov 2024 20:30:30 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-7stm6 (unknown [10.110.178.147]) by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id CAF8E1FD34; Sun, 3 Nov 2024 20:30:29 +0000 (UTC) Received: from ngraves.fr ([37.59.142.96]) by ghost-submission-5b5ff79f4f-7stm6 with ESMTPSA id 37eYKWXdJ2fX+gsAZkaXsA (envelope-from ); Sun, 03 Nov 2024 20:30:29 +0000 X-OVh-ClientIp: 86.246.19.221 In-Reply-To: <20241101132853.723629-3-lee.p.thomp@gmail.com> References: <20241101132853.723629-1-lee.p.thomp@gmail.com> <20241101132853.723629-3-lee.p.thomp@gmail.com> Date: Sun, 03 Nov 2024 21:30:26 +0100 Message-ID: <87cyjcnjq5.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 15953438732981494318 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdelgedgudefkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeeguefgvdefvdeuleegjeeiudegfeeivefhkeehteehgfeugfelteefuedtieetveenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekiedrvdegiedrudelrddvvddupdefjedrheelrddugedvrdelieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeegudehkeesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekuddpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=dAizG5HSuOC1Ue4CPHP+FVfOuK2UJhLY6/l9PVKKDKU=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1730665830; v=1; b=gWoAW0r+7D8Edhr8F+jfC6wZl7Lp5SRNwP2sSR/3b8+OTOuzuHwltvaodDF+Qja1nZc2JOfV C4Z7Y8wmj4kSILCjLMokP7ANoWr1tqeOLtoauPJRYjQQwKSws+nX6zEpxc2ZiZrmSCPB6RUJ2m0 ey+a3Z3n4jRt12TTNrP1GIJQ+7m/NZ8muOrTt6fz+DKQpXDffeD9gabRkksfFZkWtuuVQyR7jl6 EkxCp9ER9K9LdRytfUc1DbbiAezkDQtGceGhKbpw7TJpyEY1IauWgA5W7zA+6SZ30rE6W5pNFcK Fq+02e1tJmREOBkOJFEtlIo1pHd1a3mlujwuDsCek/Cqg== 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.55 X-Spam-Score: 0.55 X-Migadu-Queue-Id: E2AC587D67 X-Migadu-Scanner: mx12.migadu.com X-TUID: uW9bOa97uAk/ On 2024-11-01 13:28, Lee Thompson wrote: > Change-Id: I6c6fb384edb03b55bae63137576c364cf11e42a5 > --- > gnu/packages/text-editors.scm | 53 +++++++++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) > > diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm > index fae021f012..027f8adb6c 100644 > --- a/gnu/packages/text-editors.scm > +++ b/gnu/packages/text-editors.scm > @@ -467,6 +467,59 @@ (define-public parinfer-rust > can load dynamic libraries.") > (license license:expat))) >=20=20 > +(define-public parinfer-rust-emacs > + (package > + (name "parinfer-rust-emacs") > + (version "0.4.6") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/justinbarclay/parinfer-rust-emacs") > + (commit (string-append "v" version)))) > + (sha256 > + (base32 "1v5lcbs1x4f3b428sj9rkjbmfpzyxzny7i0pgdpnr8nyjvpkzns8")) > + (file-name (git-file-name name version)))) > + (build-system cargo-build-system) > + (arguments > + `(#:install-source? #f > + #:cargo-inputs (("rust-getopts" ,rust-getopts-0.2) > + ("rust-libc" ,rust-libc-0.2) > + ("rust-emacs" ,rust-emacs-0.19) > + ("rust-serde" ,rust-serde-1) > + ("rust-serde-json" ,rust-serde-json-1) > + ("rust-serde-derive" ,rust-serde-derive-1) > + ("rust-unicode-segmentation" ,rust-unicode-segmen= tation-1) > + ("rust-unicode-width" ,rust-unicode-width-0.1)) >From here the code is probably correct but a bit old style. I suggest some replacements below. > + #:phases (modify-phases %standard-phases > + (add-after 'install 'install-plugins-and-libs > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (lib (string-append out "/lib")) When you use gexpressions, you don't have to refer to out and can use #$output instead, which make this unecessary. To use gexpressions, drop the first ` , add a list before #:install-source, add a ` for cargo inputs, and a #~ before (modify-phases. Then you can replace out by #$output. > + (vimfiles (string-append out > + "/share/vim/vimfiles/" > + "pack/guix/start/parinfer"))) > + (with-directory-excursion "target/release" > + (install-file "libparinfer_rust.so" lib)) > + (substitute* "plugin/parinfer.vim" > + (("(let s:libdir =3D ).*" all libdir) > + (format #f "~a'~a'\n" libdir lib))) This is correct but I would suggest either using string-append instead of format, or using ~s instead of '~a' if quotes are the same to vim (I don't know if that's the case). Note that you can also use ~% instead of \n.=20 > + (install-file "doc/parinfer.txt" > + (string-append vimfiles "/doc")) > + (install-file "plugin/parinfer.vim" > + (string-append vimfiles "/plugin")) > + (install-file "rc/parinfer.kak" > + (string-append out "/share/kak/aut= oload")))))))) > + (inputs (list clang)) > + (home-page "https://github.com/justinbarclay/parinfer-rust-emacs") > + (synopsis "Emacs-centric fork of parinfer-rust") > + (description > + "A full-featured, super fast implementation of Shaun Lebron=E2=80= =99s You can probably start wiht "This package" or "@command{parinfer-rust}" provides... > +@code{parinfer}. This repo has Vim, Neovim, and Kakoune plugins, and an= Emacs > +plugin is available. The Rust library can be called from other editors = that If you only install for vim, don't indicate Emacs (unclear). > +can load dynamic libraries.") > + (license license:isc))) > + > (define-public joe > (package > (name "joe") --=20 Best regards, Nicolas Graves