unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: Gabriel Wicki <liliana.prikler@gmail.com>, 63071@debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [bug#63071] [PATCH] gnu: Add emacs-riscv-mode.
Date: Wed, 26 Apr 2023 08:29:00 +0400	[thread overview]
Message-ID: <87o7nbe06r.fsf@trop.in> (raw)
In-Reply-To: <6e8f134d43202eb43e72b1be2ac5dd520968f75d.camel@erlikon.ch>

[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]

On 2023-04-25 17:48, Gabriel Wicki wrote:

> * gnu/packages/emacs-xyz.scm (emacs-riscv-mode): New variable.
> ---
> Hi Gabriel,
>
> your patch didn't apply cleanly thanks to some coding issues, but I got
> them to work with a little bit of work.  Below is an expanded patch that
> also makes sure that spike actually exists.  It also uses 0.1 as base
> version, taken from riscv-mode.el.
>
> Cheers,
> Liliana
>
>  gnu/packages/emacs-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 7c8af093fc..3d4b9998ce 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -127,6 +127,7 @@
>  ;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
>  ;;; Copyright © 2023 Juliana Sims <juli@incana.org>
>  ;;; Copyright © 2023 Evgeny Pisemsky <evgeny@pisemsky.com>
> +;;; Copyright © 2023 Gabriel Wicki <gabriel@erlikon.ch>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -259,6 +260,7 @@ (define-module (gnu packages emacs-xyz)
>    #:use-module (gnu packages erlang)
>    #:use-module (gnu packages statistics)
>    #:use-module (gnu packages libcanberra)
> +  #:use-module (gnu packages virtualization)
>    #:use-module (gnu packages web-browsers)
>    #:use-module (gnu packages wget)
>    #:use-module (guix utils)
> @@ -35854,6 +35856,39 @@ (define-public emacs-nasm-mode
>  Unlike Emacs' generic ASM mode, it understands NASM-specific syntax.")
>      (license license:unlicense)))
>  
> +(define-public emacs-riscv-mode
> +  (let ((commit "8e335b9c93de93ed8dd063d702b0f5ad48eef6d7")
> +        (revision "1"))

Revision should be 0 here, everything else LGTM.

> +    (package
> +      (name "emacs-riscv-mode")
> +      (version (git-version "0.1" revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/AdamNiederer/riscv-mode")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                  "06jlf84mx49scw3zm1wjj25zinr2yr9abiyh83rli78wb1hdc0l4"))))
> +      (build-system emacs-build-system)
> +      (arguments
> +       (list #:phases
> +             #~(modify-phases %standard-phases
> +                 (add-after 'unpack 'hardcode-spike
> +                   (lambda* (#:key inputs #:allow-other-keys)
> +                     (emacs-substitute-variables "riscv-mode.el"
> +                       ("riscv-interpreter"
> +                        (search-input-file inputs "bin/spike"))))))))
> +      (inputs (list spike))
> +      (home-page "https://github.com/AdamNiederer/riscv-mode")
> +      (synopsis "Emacs major mode for RISC-V assembly")
> +      (description
> +       "RISC-V mode is a major mode for editing RISC-V assembly programs.
> +It includes syntax highlighting, syntactic indentation and code evaluation
> +with spike.")
> +      (license license:gpl3+))))
> +
>  (define-public emacs-validate-html
>    ;; XXX: Upstream did not tag commits yet.  However, commit below matches the
>    ;; last version bump.  Version is extracted from the keyword in main file.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2023-04-26  4:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 17:23 [bug#63071] [PATCH] gnu: Add emacs-riscv-mode Gabriel Wicki
2023-04-25 15:48 ` Gabriel Wicki
2023-04-26  4:29   ` Andrew Tropin [this message]
2023-05-03 12:28     ` bug#63071: " Nicolas Goaziou
2023-04-25 18:21 ` [bug#63071] " Liliana Marie Prikler
2023-04-25 18:27   ` Gabriel Wicki
2023-04-25 19:07     ` Liliana Marie Prikler
2023-04-25 19:14       ` Gabriel Wicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7nbe06r.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=63071@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).