GNU bug report logs - #53279
[PATCH] gnu: Add emacs-dtache

Previous Next

Package: guix-patches;

Reported by: Niklas Eklund <niklas.eklund <at> posteo.net>

Date: Sat, 15 Jan 2022 08:36:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 53279 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Niklas Eklund <niklas.eklund <at> posteo.net>
Cc: 53279 <at> debbugs.gnu.org
Subject: Re: [bug#53279] [PATCH] gnu: Add emacs-dtache
Date: Sat, 15 Jan 2022 21:25:05 +0100
Hello,

Niklas Eklund <niklas.eklund <at> 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




This bug report was last modified 3 years and 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.