diff mbox series

[bug#53279] gnu: Add emacs-dtache

Message ID 87czktkr40.fsf@posteo.net
State Accepted
Headers show
Series [bug#53279] gnu: Add emacs-dtache | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Niklas Eklund Jan. 15, 2022, 2:31 p.m. UTC
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
diff mbox series

Patch

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