From patchwork Tue Apr 4 14:30:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Svoboda X-Patchwork-Id: 48974 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 841BA172F3; Tue, 4 Apr 2023 15:32:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6B041172D1 for ; Tue, 4 Apr 2023 15:32:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjhhg-0004kO-NP; Tue, 04 Apr 2023 10:32:08 -0400 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 1pjhhd-0004jr-9P for guix-patches@gnu.org; Tue, 04 Apr 2023 10:32:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjhhb-0003L5-J8 for guix-patches@gnu.org; Tue, 04 Apr 2023 10:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjhha-0002HQ-Af for guix-patches@gnu.org; Tue, 04 Apr 2023 10:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62664] [PATCH] [WIP] gnu: Add emacs-copilot. Resent-From: Rostislav Svoboda Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 Apr 2023 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62664 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62664@debbugs.gnu.org Cc: Rostislav Svoboda X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16806186768705 (code B ref -1); Tue, 04 Apr 2023 14:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2023 14:31:16 +0000 Received: from localhost ([127.0.0.1]:49987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjhgp-0002GL-Tm for submit@debbugs.gnu.org; Tue, 04 Apr 2023 10:31:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:39406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjhgo-0002GE-V7 for submit@debbugs.gnu.org; Tue, 04 Apr 2023 10:31:15 -0400 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 1pjhgo-0004br-AD for guix-patches@gnu.org; Tue, 04 Apr 2023 10:31:14 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjhgl-00037R-T6 for guix-patches@gnu.org; Tue, 04 Apr 2023 10:31:14 -0400 Received: by mail-wr1-x42c.google.com with SMTP id v1so33044350wrv.1 for ; Tue, 04 Apr 2023 07:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680618670; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7X/PCZ/MiVi6dXFBz/1vSMlT7QO0WJwB1DFfEtYorA0=; b=e+aMs6CahQezgYE8/ed++fO88BieebGaS9YCdIJlJTxTvXu5SVfUQaRZF6xZTNVxDo vUFVThEzNrjtjjBuZSTcHwdh/DRAl6NNByzCZEmHGnapKArcSpfh2aqGH2OH7qRY8Rtk a9lUFl6ONQdAqYqFX02Nixdq/UNZ0f+AnW39wGdGt6A4/6omXRTFF9NKMfUbDsaBGArl D+mhGNx0/OaUJR2msc79kr4Ytb4NWZDeqsPHFrwxnT2ZMF5bWK/msi1ATsCZwNVj9a+d wOmWRgL7fkAMNxoQsc1t0VJMicPZvRmLaL89WDfM8gYDsw0Q5LAF+IF8kk7UikGwYQJl 59KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680618670; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7X/PCZ/MiVi6dXFBz/1vSMlT7QO0WJwB1DFfEtYorA0=; b=z/T2BCbFHqQLfzgIS8bC/w0Q2CDJB7v9MBFbDsKvM5iU/qxGcnzqJEPNX0hP4SLaR2 /8SW49cIq3q60ImzILYoToPxMnnu0WiJ18IQYuGX2Vl8L3MRqD/a6IzEWPzbYBbImCBs 9bVFzOI7t5jwA8e0LcodHPXhpmSYT55C4ZVJq/XSNKfNWhvIUK2KxpTh2QLDCCqTSGYy e95rssBw8yvZnTqvcuCwMgxYiODg2vPmugyP8iIPYHosmqWg617eVqeTKTPbKiJrya2H k2pBKA5C/n0a2GBnyf2AR/VUBH2XpEBfjJu7OcviNR4S6eG/U7k7fkMb5ImL3rpHh70U M4Fw== X-Gm-Message-State: AAQBX9cErrl0mT3h1TlECq/zlKBqbMnLSCvbgClWzZ379YOEthAeiO6R Qp1RJV5ePH5M3MPRTj+i9JFoyrEu+iig3Q== X-Google-Smtp-Source: AKy350buI7y/qzQkXtJZhEmhlL0Vd6+8UCu4PQ9xi7aZrhXxts6My4HB107wc25tV2R1N8dl8mCjgA== X-Received: by 2002:adf:f2d1:0:b0:2cf:f0c3:79ba with SMTP id d17-20020adff2d1000000b002cff0c379bamr1571652wrp.67.1680618669450; Tue, 04 Apr 2023 07:31:09 -0700 (PDT) Received: from ecke.fritz.box (dynamic-077-180-102-234.77.180.pool.telefonica.de. [77.180.102.234]) by smtp.googlemail.com with ESMTPSA id g7-20020a5d5407000000b002e6423cb207sm11363435wrv.112.2023.04.04.07.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 07:31:08 -0700 (PDT) From: Rostislav Svoboda X-Google-Original-From: Rostislav Svoboda Date: Tue, 4 Apr 2023 16:30:43 +0200 Message-Id: <20230404143043.3202-1-Rostislav.Svoboda@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=rostislav.svoboda@gmail.com; helo=mail-wr1-x42c.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/emacs-xyz.scm | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 2b96c60057..d037fa9075 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -36689,6 +36689,52 @@ (define-public emacs-tintin-mode (description "This major mode focuses on highlighting as many aspects of the TinTin++ scripting language as possible, organizing commands into functional categories and highlighting specific modes that many commands use to accomplish different tasks.") (license license:asl2.0)))) +(define-public emacs-copilot + (let ((commit "e11847ab0c3b183a1e53fbc1ac587de82912b9cf") + (revision "0")) + (package + (name "emacs-copilot") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zerolfx/copilot.el.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gsxb268vqyim65ag8d7dlgdqyxqrjcjirlnbfbfq0pdr1y2158q")))) + (build-system emacs-build-system) + (arguments + (list + #:include #~(cons "^dist/" %default-include) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'substitute-copilot-node-executable + (lambda* (#:key inputs #:allow-other-keys) + (emacs-substitute-variables "copilot.el" + ("copilot-node-executable" +;;; Copilot requires Node 16+, however packaging v16 and/or v18 is not +;;; trivial. See https://issues.guix.gnu.org/53414, +;;; https://issues.guix.gnu.org/59188 . +;;; +;;; As a hack, download and compile recent Node version manually. + (format #f "%s/node-v18.15.0/out/Release/node" (getenv "dev")) ; Remove this line when Node 16+ becomes available as a Guix package. + ;; (search-input-file inputs "/bin/node") ; Activate this line when Node 16+ becomes available as a Guix package. + ))))))) + ;; (inputs (list node)) ; Activate this line when Node 16+ becomes available as a Guix package. + (propagated-inputs + (list emacs-dash emacs-editorconfig emacs-s)) + (home-page + "https://github.com/zerolfx/copilot.el.git") + (synopsis "An unofficial Copilot plugin for Emacs") + (description + "Copilot.el is an Emacs plugin for GitHub Copilot. This plugin is +unofficial and based on binaries provided by copilot.vim. Note: You need +access to GitHub Copilot to use this plugin.") + (license license:gpl3+)))) + ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar