GNU bug report logs -
#53279
[PATCH] gnu: Add emacs-dtache
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53279 in the body.
You can then email your comments to 53279 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sat, 15 Jan 2022 08:36:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Niklas Eklund <niklas.eklund <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 15 Jan 2022 08:36:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I would like to contribute with my package dtache to guix.
/Niklas
[0001-gnu-Add-emacs-dtache-package.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sat, 15 Jan 2022 11:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 53279 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Niklas Eklund schreef op za 15-01-2022 om 08:35 [+0000]:
> + (modify-phases %standard-phases
> + (add-before 'install 'install-dtache-env
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin")))
> + (mkdir-p bin)
> + (copy-file "dtache-env"
> + (string-append bin "/dtache-env"))))))))
FWIW you can eliminate (#:key outputs #:allow-other-keys) here:
,#~(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"))))))))
YMMV on whether that's an improvement or not -- technically
they are equivalent.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sat, 15 Jan 2022 14:32:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 53279 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:
> Hi,
>
> Niklas Eklund schreef op za 15-01-2022 om 08:35 [+0000]:
>> + (modify-phases %standard-phases
>> + (add-before 'install 'install-dtache-env
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (bin (string-append out "/bin")))
>> + (mkdir-p bin)
>> + (copy-file "dtache-env"
>> + (string-append bin "/dtache-env"))))))))
>
> FWIW you can eliminate (#:key outputs #:allow-other-keys) here:
>
> ,#~(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"))))))))
>
> YMMV on whether that's an improvement or not -- technically
> they are equivalent.
>
> Greetings,
> Maxime.
Hi Maxime,
thanks for the suggestion :). Here is a new patch with the changes.
Cheers
Niklas
[0001-gnu-Add-emacs-dtache-package.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sat, 15 Jan 2022 17:09:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 53279 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Niklas Eklund <niklas.eklund <at> posteo.net> writes:
> Maxime Devos <maximedevos <at> telenet.be> writes:
>
>> Hi,
>>
>> Niklas Eklund schreef op za 15-01-2022 om 08:35 [+0000]:
>>> + (modify-phases %standard-phases
>>> + (add-before 'install 'install-dtache-env
>>> + (lambda* (#:key outputs #:allow-other-keys)
>>> + (let* ((out (assoc-ref outputs "out"))
>>> + (bin (string-append out "/bin")))
>>> + (mkdir-p bin)
>>> + (copy-file "dtache-env"
>>> + (string-append bin "/dtache-env"))))))))
>>
>> FWIW you can eliminate (#:key outputs #:allow-other-keys) here:
>>
>> ,#~(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"))))))))
>>
>> YMMV on whether that's an improvement or not -- technically
>> they are equivalent.
>>
>> Greetings,
>> Maxime.
>
> Hi Maxime,
>
> thanks for the suggestion :). Here is a new patch with the changes.
>
> Cheers
> Niklas
>
Hi again,
there is an even newer version of the package available so here is a
patch featuring version 0.3 instead of version 0.2 :)
/Niklas
[0001-gnu-Add-emacs-dtache-package.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sat, 15 Jan 2022 20:26:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 53279 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53279
; Package
guix-patches
.
(Sun, 16 Jan 2022 22:57:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 53279 <at> debbugs.gnu.org (full text, mbox):
Hello,
Niklas Eklund <niklas.eklund <at> posteo.net> writes:
> Ah good to know, I have updated that part now.
Thanks for the update. I merged the consecutive phases with
emacs-substitute-variables for clarity, and enabled tests with "#:tests?
#true". I'm sending the package definition in its current state:
--8<---------------cut here---------------start------------->8---
(define-public emacs-dtache
(package
(name "emacs-dtache")
(version "0.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/niklaseklund/dtache")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0f2yxrqfkslif2y88x9vlpshadifppxw6yl1rrf1qzfjy6cv144n"))))
(arguments
(list
#:tests? #true
#: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"))))
(add-after 'unpack 'locate-dtach
(lambda* (#:key inputs #:allow-other-keys)
(make-file-writable "dtache.el")
(emacs-substitute-variables "dtache.el"
("dtache-env"
(string-append #$output "/bin/dtache-env"))
("dtache-dtach-program"
(search-input-file inputs "/bin/dtach"))
("dtache-shell-program"
(search-input-file inputs "/bin/bash"))))))))
(build-system emacs-build-system)
(native-inputs (list emacs-ert-runner))
(inputs (list dtach))
(home-page "https://gitlab.com/niklaseklund/dtache")
(synopsis "Run and interact with detached shell commands")
(description
"The dtache package allows users to run shell commands
detached from Emacs. These commands are launched in sessions, using the
program dtach.")
(license license:gpl3+)))
--8<---------------cut here---------------end--------------->8---
Unfortunately, one test is failing with the following output:
--8<---------------cut here---------------start------------->8---
.......Test dtache-test-dtach-command backtrace:
Test dtache-test-dtach-command condition:
(ert-test-failed
((should
(equal expected-concat
(dtache-dtach-command session t)))
:form
(equal "dtach -c /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.socket -z bash -c \\{\\ dtache-env\\ ls\\\\\\ -la\\;\\ \\}\\ 2\\>\\&1\\ \\|\\ tee\\ /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.log" "/gnu/store/prhk20g1yp8qbn4rj5h25cdpimxynq3d-dtach-0.9/bin/dtach -c /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.socket -z bash -c \\{\\ dtache-env\\ ls\\\\\\ -la\\;\\ \\}\\ 2\\>\\&1\\ \\|\\ tee\\ /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.log")
:value nil :explanation
(arrays-of-different-length 268 326 "dtach -c /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.socket -z bash -c \\{\\ dtache-env\\ ls\\\\\\ -la\\;\\ \\}\\ 2\\>\\&1\\ \\|\\ tee\\ /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.log" "/gnu/store/prhk20g1yp8qbn4rj5h25cdpimxynq3d-dtach-0.9/bin/dtach -c /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.socket -z bash -c \\{\\ dtache-env\\ ls\\\\\\ -la\\;\\ \\}\\ 2\\>\\&1\\ \\|\\ tee\\ /tmp/guix-build-emacs-dtache-0.3.drv-0/dtache7Dw27E/sessions/7695240f5262181009a25db676161039.log" first-mismatch-at 0)))
F................
--8<---------------cut here---------------end--------------->8---
Do you think this can be fixed? Or shall we skip that test?
Regards,
--
Nicolas Goaziou
Reply sent
to
Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:
You have taken responsibility.
(Wed, 19 Jan 2022 17:12:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Niklas Eklund <niklas.eklund <at> posteo.net>
:
bug acknowledged by developer.
(Wed, 19 Jan 2022 17:12:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 53279-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Niklas Eklund <niklas.eklund <at> posteo.net> writes:
> I think it make sense to fix it, it was a small typo that I hadn't
> captured before. I have created a new patch, where I have updated the
> package definition to use a specific commit which solves the issue with
> the failing test.
I added a comment explaining why we do not use a tagged release, fixed
indentation, and applied your patch. Thank you.
Regards,
--
Nicolas Goaziou
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 17 Feb 2022 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.