* [bug#53279] [PATCH] gnu: Add emacs-dtache
@ 2022-01-15 8:35 Niklas Eklund
2022-01-15 11:11 ` Maxime Devos
0 siblings, 1 reply; 7+ messages in thread
From: Niklas Eklund @ 2022-01-15 8:35 UTC (permalink / raw)
To: 53279
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
Hi,
I would like to contribute with my package dtache to guix.
/Niklas
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 2987 bytes --]
From 3e04c575776a8f1fb4afa4df3146f63cd7b5a094 Mon Sep 17 00:00:00 2001
From: Niklas Eklund <niklas.eklund@posteo.net>
Date: Thu, 13 Jan 2022 18:19:57 +0100
Subject: [PATCH] gnu: Add emacs-dtache package.
---
gnu/packages/emacs-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index df469fa..ea97bac 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -78,7 +78,7 @@
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
-;;; Copyright © 2020, 2021 Niklas Eklund <niklas.eklund@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Niklas Eklund <niklas.eklund@posteo.net>
;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;; Copyright © 2020, 2021 Zhu Zihao <all_but_last@163.com>
@@ -214,6 +214,7 @@ (define-module (gnu packages emacs-xyz)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages screen)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages shells)
#:use-module (gnu packages shellutils)
@@ -23366,6 +23367,42 @@ (define-public emacs-cmake-font-lock
according to their use.")
(license license:gpl3+))))
+(define-public emacs-dtache
+ (package
+ (name "emacs-dtache")
+ (version "0.2")
+ (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 "1dnwdkd9bhrvspmp83k40ji1ylm6dhbj4hfhmscjd8s1f4n6jyym"))))
+ (native-inputs
+ (list emacs-ert-runner))
+ (inputs
+ (list dtach))
+ (arguments
+ `(#:test-command '("ert-runner")
+ #:phases
+ (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"))))))))
+ (build-system emacs-build-system)
+ (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+)))
+
(define-public emacs-dtrt-indent
(package
(name "emacs-dtrt-indent")
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#53279] [PATCH] gnu: Add emacs-dtache
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
0 siblings, 1 reply; 7+ messages in thread
From: Maxime Devos @ 2022-01-15 11:11 UTC (permalink / raw)
To: Niklas Eklund, 53279
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
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.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#53279] [PATCH] gnu: Add emacs-dtache
2022-01-15 11:11 ` Maxime Devos
@ 2022-01-15 14:31 ` Niklas Eklund
2022-01-15 17:08 ` Niklas Eklund
0 siblings, 1 reply; 7+ messages in thread
From: Niklas Eklund @ 2022-01-15 14:31 UTC (permalink / raw)
To: 53279
[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]
Maxime Devos <maximedevos@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
[-- Attachment #2: updated-patch --]
[-- Type: text/x-patch, Size: 2988 bytes --]
From a0bba7a205bcf542804fe2c67f7d2a5192e90489 Mon Sep 17 00:00:00 2001
From: Niklas Eklund <niklas.eklund@posteo.net>
Date: Thu, 13 Jan 2022 18:19:57 +0100
Subject: [PATCH] gnu: Add emacs-dtache package.
---
gnu/packages/emacs-xyz.scm | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f7022d1f34..8d86429c02 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -78,7 +78,7 @@
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
-;;; Copyright © 2020, 2021 Niklas Eklund <niklas.eklund@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Niklas Eklund <niklas.eklund@posteo.net>
;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;; Copyright © 2020, 2021 Zhu Zihao <all_but_last@163.com>
@@ -214,6 +214,7 @@ (define-module (gnu packages emacs-xyz)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages screen)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages shells)
#:use-module (gnu packages shellutils)
@@ -23366,6 +23367,40 @@ (define-public emacs-cmake-font-lock
according to their use.")
(license license:gpl3+))))
+(define-public emacs-dtache
+ (package
+ (name "emacs-dtache")
+ (version "0.2")
+ (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
+ "1dnwdkd9bhrvspmp83k40ji1ylm6dhbj4hfhmscjd8s1f4n6jyym"))))
+ (native-inputs (list emacs-ert-runner))
+ (inputs (list dtach))
+ (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"))))))))
+ (build-system emacs-build-system)
+ (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+)))
+
(define-public emacs-dtrt-indent
(package
(name "emacs-dtrt-indent")
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#53279] [PATCH] gnu: Add emacs-dtache
2022-01-15 14:31 ` Niklas Eklund
@ 2022-01-15 17:08 ` Niklas Eklund
2022-01-15 20:25 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Niklas Eklund @ 2022-01-15 17:08 UTC (permalink / raw)
To: 53279
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
Niklas Eklund <niklas.eklund@posteo.net> writes:
> Maxime Devos <maximedevos@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
[-- Attachment #2: version_03 --]
[-- Type: text/x-patch, Size: 2988 bytes --]
From ec51862795bc3f746cd1cb6e7472826a204ad1f2 Mon Sep 17 00:00:00 2001
From: Niklas Eklund <niklas.eklund@posteo.net>
Date: Thu, 13 Jan 2022 18:19:57 +0100
Subject: [PATCH] gnu: Add emacs-dtache package.
---
gnu/packages/emacs-xyz.scm | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f7022d1f34..5020c4ba43 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -78,7 +78,7 @@
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
-;;; Copyright © 2020, 2021 Niklas Eklund <niklas.eklund@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Niklas Eklund <niklas.eklund@posteo.net>
;;; Copyright © 2020 Marco Grassi <marco.au.grassi98@protonmail.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;; Copyright © 2020, 2021 Zhu Zihao <all_but_last@163.com>
@@ -214,6 +214,7 @@ (define-module (gnu packages emacs-xyz)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages screen)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages shells)
#:use-module (gnu packages shellutils)
@@ -23366,6 +23367,40 @@ (define-public emacs-cmake-font-lock
according to their use.")
(license license:gpl3+))))
+(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"))))
+ (native-inputs (list emacs-ert-runner))
+ (inputs (list dtach))
+ (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"))))))))
+ (build-system emacs-build-system)
+ (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+)))
+
(define-public emacs-dtrt-indent
(package
(name "emacs-dtrt-indent")
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#53279] [PATCH] gnu: Add emacs-dtache
2022-01-15 17:08 ` Niklas Eklund
@ 2022-01-15 20:25 ` Nicolas Goaziou
[not found] ` <87ee587itt.fsf@posteo.net>
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2022-01-15 20:25 UTC (permalink / raw)
To: Niklas Eklund; +Cc: 53279
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-19 17:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[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
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.