From patchwork Fri Jul 3 16:14:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Soo X-Patchwork-Id: 22996 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 24C9B27BBE1; Fri, 3 Jul 2020 17:33:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 3597727BBE3 for ; Fri, 3 Jul 2020 17:33:49 +0100 (BST) Received: from localhost ([::1]:37568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrOdI-0006Wf-MX for patchwork@mira.cbaines.net; Fri, 03 Jul 2020 12:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrOM6-0007ft-St for guix-patches@gnu.org; Fri, 03 Jul 2020 12:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrOM6-0003tI-Hm for guix-patches@gnu.org; Fri, 03 Jul 2020 12:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrOM6-0001VJ-CT for guix-patches@gnu.org; Fri, 03 Jul 2020 12:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42179] [PATCH] gnu: Add racer. Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Jul 2020 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42179@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15937929265732 (code B ref -1); Fri, 03 Jul 2020 16:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2020 16:15:26 +0000 Received: from localhost ([127.0.0.1]:57412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrOLT-0001UK-Ql for submit@debbugs.gnu.org; Fri, 03 Jul 2020 12:15:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:47570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrOLL-0001U4-Ie for submit@debbugs.gnu.org; Fri, 03 Jul 2020 12:15:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrOLL-0006Oj-7l for guix-patches@gnu.org; Fri, 03 Jul 2020 12:15:15 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:46970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrOLB-0003XV-Cd for guix-patches@gnu.org; Fri, 03 Jul 2020 12:15:14 -0400 Received: by mail-pg1-x52b.google.com with SMTP id d194so11924549pga.13 for ; Fri, 03 Jul 2020 09:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=QV3n7CjrbTg3HFHTOLMQgUFUNcwGpUuhos6ktFxXTtk=; b=jYv6wz4IGm7nw7MG3jAU9o+1ypTbhMPelC9ORynfM9kxHXzn7dqbS+r+G+MTNDxdfE hr+mGq4o/Fan39EaWg1czlxPRpNVDEDv1F56El7TFl+GfHTPGnrzEHXfrZqduDwigcXZ 69EL7AnoKdyean3gkhCyJok+G9V5oqQrAaEoDQne+ZVeROMNAUqLcHS3XwpsH2KbFvLg TXWgsxoznkTV9PedYb0whU1M8WVaUblH+ZTWU/QRa/AO3fzGW0dpgCcVSae1avie7mDR LjkxP0atlPUzLQ0Nm9KaMJNAR8MpzovpuZAqnWR6dQPjBKYb/40WCVjqATyMOz/YC2Xb KgGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=QV3n7CjrbTg3HFHTOLMQgUFUNcwGpUuhos6ktFxXTtk=; b=prt0dgt+mGZtPJc7eSXwbVOEnKrogq7vN+AVywhQsnEj5au1Mw1XcY2qnEIkIsadvw kIJWt6LSHaYEmx99XmXUuLlDoAvB1/G8ZRCOcoY/p9TBkkRQ3RAAfeltY9eo1gCNMAsj 7PoUFb/KZRz31P6bWjmQpmCVx+mjUqaepsCMhjxwKSaLGHUazJR/rtbBMX7yydWRQPoh cM/PBh2Z6fVsPQzpPBM7391/6gS+l26LgzEorOgciUawhYi+drcqcxb/okiRbAS3Ysji Kt2wTq3YJhiNfqwbPQg5cVst6hKZFioYE3WInoViWehGbjd359MqU3BkS/cIa53n1Rv0 HxSg== X-Gm-Message-State: AOAM531i95hJs0F3ElUyzYRgr+TbZ2yFSSeGvtpo2aOf51eKS/5m1v5y IiaJO1NMkpfmNjbo3/2O0IpeIBRIaJw= X-Google-Smtp-Source: ABdhPJy1Si4R9vNB83gghd2L3Aptc++9Y0MOS4e5EOhtb97pSK3AGQM1Y8S6eiVFYiTfYPSc1/D30Q== X-Received: by 2002:a63:7c56:: with SMTP id l22mr28949558pgn.127.1593792902377; Fri, 03 Jul 2020 09:15:02 -0700 (PDT) Received: from ecenter ([2600:1700:83b0:8bd0::59c]) by smtp.gmail.com with ESMTPSA id a11sm6115837pjw.35.2020.07.03.09.14.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jul 2020 09:15:00 -0700 (PDT) From: John Soo Date: Fri, 03 Jul 2020 09:14:59 -0700 Message-ID: <87y2o0d18c.fsf@asu.edu> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=jsoo1@asu.edu; helo=mail-pg1-x52b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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" X-getmail-retrieved-from-mailbox: Patches Hi Guix, I have been writing a lot of Rust recently. Racer provides autocompletion. It uses the source of rust standard libraries among other tools. There are two items I paid close attention to: 1. Add a "source" output for rust. This roughly corresponds to the rustup component. Using the rustup toolchain to manage rust tooling the command would be: rustup component add rust-src. However, using guix, we already have the source. 2. Racer requires features that are not in the stable branch of rust. Unfortunately this is not any fault of racer. Racer uses crates from rustc which uses unstable features. To get around this, I built racer using the undocumented and unsupported RUSTC_BOOTSTRAP environment variable. Perhaps the better future solution would be to provide a nightly rustc and use that to compile racer. I hope someone gets some use out of racer! - John From 7b9030a45938f0caba0591c4c99e778d45028100 Mon Sep 17 00:00:00 2001 From: John Soo Date: Tue, 16 Jun 2020 23:43:49 -0700 Subject: [PATCH 33/33] gnu: emacs-racer: Patch paths to rust source and racer. * gnu/packages/emacs-xyz.scm (emacs-racer): [arguments] Patch paths to rust source and racer binary in racer.el. --- gnu/packages/emacs-xyz.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index aae9eb25fd..f0a1fddb83 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -168,6 +168,8 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages password-utils) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages sphinx) #:use-module (gnu packages xdisorg) #:use-module (gnu packages shells) @@ -17375,11 +17377,21 @@ files. It focuses on highlighting the document to improve readability.") #:test-command '("make" "test") #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-rust-src-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "racer.el" + (("/usr/local/src/rust/src") + (string-append (assoc-ref inputs "rust") "/src/src")) + (("/usr/local/bin/racer") + (string-append (assoc-ref inputs "racer") "/bin/racer"))))) (add-before 'check 'fix-makefile (lambda _ (substitute* "Makefile" (("\\$\\{CASK\\} exec ") "")) #t))))) + (inputs + `(("racer" ,racer) + ("rust" ,rust "source"))) (native-inputs `(("emacs-ert-runner" ,emacs-ert-runner) ("emacs-undercover" ,emacs-undercover))) -- 2.26.2