all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Niklas Eklund <niklas.eklund@posteo.net>
Cc: 53279@debbugs.gnu.org
Subject: [bug#53279] [PATCH] gnu: Add emacs-dtache
Date: Sat, 15 Jan 2022 21:25:05 +0100	[thread overview]
Message-ID: <87a6fw3fxa.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <877db13p1e.fsf@posteo.net> (Niklas Eklund's message of "Sat, 15 Jan 2022 17:08:13 +0000")

Hello,

Niklas Eklund <niklas.eklund@posteo.net> writes:

> +(define-public emacs-dtache
> +  (package
> +    (name "emacs-dtache")
> +    (version "0.3")

Thank you.

> +    (native-inputs (list emacs-ert-runner))
> +    (inputs (list dtach))

Nitpick: native-inputs and inputs are usually located after arguments
and build-system.

Adding "dtach" to input is insufficient. You also need to set
`dtache-dtach-program' so it points to the dtach program provided as an
input. Likewise, you also need to set `dtache-shell-program' so it
points to the bash from the package inputs.

For example, you can do the first step with the following phase:

--8<---------------cut here---------------start------------->8---
(add-after 'unpack 'locate-dtach
  (lambda* (#:key inputs #:allow-other-keys)
    (make-file-writable "dtache.el")
    (emacs-substitute-variables "dtache.el"
      ("dtache-dtach-program"
       (search-input-file inputs "/bin/dtach")))))
--8<---------------cut here---------------end--------------->8---

> +    (arguments
> +     `(#:test-command '("ert-runner")
> +       #:phases
> +       ,#~(modify-phases %standard-phases
> +            (add-before 'install 'install-dtache-env
> +              (lambda _
> +                (let ((bin (string-append #$output "/bin")))
> +                  (mkdir-p bin)
> +                  (copy-file "dtache-env"
> +                             (string-append bin "/dtache-env"))))))))

You can simplify the arguments further:

--8<---------------cut here---------------start------------->8---
(arguments
 (list
  #:test-command #~(list "ert-runner")
  #:phases
  #~(modify-phases %standard-phases
      (add-before 'install 'install-dtache-env
        (lambda _
          (install-file "dtache-env" (string-append #$output "/bin")))))))
--8<---------------cut here---------------end--------------->8---

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




  reply	other threads:[~2022-01-15 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-15  8:35 [bug#53279] [PATCH] gnu: Add emacs-dtache Niklas Eklund
2022-01-15 11:11 ` Maxime Devos
2022-01-15 14:31   ` Niklas Eklund
2022-01-15 17:08     ` Niklas Eklund
2022-01-15 20:25       ` Nicolas Goaziou [this message]
     [not found]         ` <87ee587itt.fsf@posteo.net>
2022-01-16 22:56           ` Nicolas Goaziou
     [not found]             ` <87h7a2y27d.fsf@posteo.net>
2022-01-19 17:11               ` bug#53279: " Nicolas Goaziou

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

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

  git send-email \
    --in-reply-to=87a6fw3fxa.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=53279@debbugs.gnu.org \
    --cc=niklas.eklund@posteo.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.