[PATCH 1/1] gnu: Add emacs-ddskk-with-nicola

  • Done
  • quality assurance status badge
Details
2 participants
  • Taiju HIGASHI
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Taiju HIGASHI
Severity
normal
T
T
Taiju HIGASHI wrote on 18 Nov 2021 15:01
(address . guix-patches@gnu.org)(name . Taiju HIGASHI)(address . higashi@taiju.info)
20211118140159.34749-2-higashi@taiju.info
---
gnu/packages/emacs-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e141c390d8..0ca2bbc066 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28635,6 +28635,35 @@ (define-public emacs-ddskk
conversion program}, a Japanese input method on Emacs.")
(license license:gpl2+))))
+(define-public emacs-ddskk-with-nicola
+ (package
+ (inherit emacs-ddskk)
+ (name "emacs-ddskk-with-nicola")
+ (synopsis "Simple Kana to Kanji conversion program (with NICOLA)")
+ (propagated-inputs
+ `(("emacs-ddskk" ,emacs-ddskk)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments emacs-ddskk)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "nicola")
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "Makefile"
+ (("PREFIX = NONE")
+ (string-append "PREFIX = " out))
+ (("LISPDIR = NONE")
+ (string-append "LISPDIR = " out "/share/emacs/site-lisp"))))
+ (make-file-writable "NICOLA-DDSKK-CFG")
+ (emacs-substitute-sexps "NICOLA-DDSKK-CFG"
+ ("setq NICOLA-DDSKK_PREFIX" ""))
+ #t))
+ (delete 'check)))))))
+
(define-public emacs-objed
(package
(name "emacs-objed")
--
2.33.1
T
T
Taiju HIGASHI wrote on 18 Nov 2021 16:17
(address . 51950@debbugs.gnu.org)
A65BF876-53FE-4C53-96BF-57C976C93E66@taiju.info
I'm sorry.

I accidentally sent two e-mails to you.

The contents of the first email are quoted below.

----
Hi,

I'm a native speaker of Japanese.

There is emacs-ddskk in the gnu channel of Guix, but I usually use the kana
direct input method.

To use the kana direct input method with the ddskk emacs package, we need to
do the following steps after installing ddskk.
(japanese)

With this patch, that will be no longer necessary.

I wanted to implement it with multiple outputs, but I couldn't figure out how
to implement it when there is a dependency between two outputs.

I'm new to Guix, so please let me know if there is a more appropriate
solution.

Thank you.
L
L
Liliana Marie Prikler wrote on 21 Nov 2021 09:54
5d06db0edae1c2ecb1fa94aed5aa17d65480f12c.camel@gmail.com
Am Donnerstag, den 18.11.2021, 23:01 +0900 schrieb Taiju HIGASHI:
Toggle quote (41 lines)
> ---
> gnu/packages/emacs-xyz.scm | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index e141c390d8..0ca2bbc066 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -28635,6 +28635,35 @@ (define-public emacs-ddskk
> conversion program}, a Japanese input method on Emacs.")
> (license license:gpl2+))))
>
> +(define-public emacs-ddskk-with-nicola
> + (package
> + (inherit emacs-ddskk)
> + (name "emacs-ddskk-with-nicola")
> + (synopsis "Simple Kana to Kanji conversion program (with
> NICOLA)")
> + (propagated-inputs
> + `(("emacs-ddskk" ,emacs-ddskk)))
> + (arguments
> + (substitute-keyword-arguments (package-arguments emacs-ddskk)
> + ((#:phases phases)
> + `(modify-phases ,phases
> + (add-after 'unpack 'chdir
> + (lambda _
> + (chdir "nicola")
> + #t))
> + (replace 'configure
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (substitute* "Makefile"
> + (("PREFIX = NONE")
> + (string-append "PREFIX = " out))
> + (("LISPDIR = NONE")
> + (string-append "LISPDIR = " out
> "/share/emacs/site-lisp"))))
> + (make-file-writable "NICOLA-DDSKK-CFG")
> + (emacs-substitute-sexps "NICOLA-DDSKK-CFG"
> + ("setq NICOLA-DDSKK_PREFIX" ""))
> + #t))
You don't need to patch the Makefile to set those variables, use
#:make-flags instead.
Toggle quote (1 lines)
> + (delete 'check)))))))
Again, use #:tests? and provide a comment as to why you're setting it
to #f.

Cheers
T
T
Taiju HIGASHI wrote on 22 Nov 2021 03:58
[PATCH v2] gnu: Add emacs-ddskk-with-nicola
(name . Taiju HIGASHI)(address . higashi@taiju.info)
20211122025833.44591-1-higashi@taiju.info
---
gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d3338d45bd..7f82bace7b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28631,6 +28631,34 @@ (define-public emacs-ddskk
conversion program}, a Japanese input method on Emacs.")
(license license:gpl2+))))
+(define-public emacs-ddskk-with-nicola
+ (package
+ (inherit emacs-ddskk)
+ (name "emacs-ddskk-with-nicola")
+ (synopsis "Simple Kana to Kanji conversion program (with NICOLA)")
+ (propagated-inputs
+ `(("emacs-ddskk" ,emacs-ddskk)))
+ (arguments
+ `(#:make-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (append
+ (list (string-append "PREFIX=" out)
+ (string-append "LISPDIR=" out "/share/emacs/site-lisp"))))
+ #:tests? #f ; no test
+ ,@(substitute-keyword-arguments (package-arguments emacs-ddskk)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "nicola")
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (make-file-writable "NICOLA-DDSKK-CFG")
+ (emacs-substitute-sexps "NICOLA-DDSKK-CFG"
+ ("setq NICOLA-DDSKK_PREFIX" ""))
+ #t)))))))))
+
(define-public emacs-objed
(package
(name "emacs-objed")
--
2.33.1
T
T
Taiju HIGASHI wrote on 22 Nov 2021 04:05
87y25gj3fc.fsf@taiju.info
Thanks for your review.
I've fixed it.
T
T
Taiju HIGASHI wrote on 22 Nov 2021 04:16
[PATCH v3] gnu: Add emacs-ddskk-with-nicola
(address . 51950@debbugs.gnu.org)(name . Taiju HIGASHI)(address . higashi@taiju.info)
20211122031627.45911-1-higashi@taiju.info
---
gnu/packages/emacs-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d3338d45bd..de0e94c7ee 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28631,6 +28631,33 @@ (define-public emacs-ddskk
conversion program}, a Japanese input method on Emacs.")
(license license:gpl2+))))
+(define-public emacs-ddskk-with-nicola
+ (package
+ (inherit emacs-ddskk)
+ (name "emacs-ddskk-with-nicola")
+ (synopsis "Simple Kana to Kanji conversion program (with NICOLA)")
+ (propagated-inputs
+ `(("emacs-ddskk" ,emacs-ddskk)))
+ (arguments
+ `(#:make-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list (string-append "PREFIX=" out)
+ (string-append "LISPDIR=" out "/share/emacs/site-lisp")))
+ #:tests? #f ; no test
+ ,@(substitute-keyword-arguments (package-arguments emacs-ddskk)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "nicola")
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (make-file-writable "NICOLA-DDSKK-CFG")
+ (emacs-substitute-sexps "NICOLA-DDSKK-CFG"
+ ("setq NICOLA-DDSKK_PREFIX" ""))
+ #t)))))))))
+
(define-public emacs-objed
(package
(name "emacs-objed")
--
2.33.1
T
T
Taiju HIGASHI wrote on 22 Nov 2021 04:18
(address . 51950@debbugs.gnu.org)
87tug4j2t8.fsf@taiju.info
I'm sorry. Unnecessary `append` was left in the file, so I removed it.
L
L
Liliana Marie Prikler wrote on 22 Nov 2021 21:37
Re: [PATCH v2] gnu: Add emacs-ddskk-with-nicola
1c268cebb1763a6a34cf98c1c1eb2fb572d3188a.camel@gmail.com
Pushed with minor adjustments to synopsis and description, as well as a
commit message.

Thanks
Closed
T
T
Taiju HIGASHI wrote on 25 Nov 2021 08:45
87h7c0ispo.fsf@taiju.info
Thank you for merge!

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (4 lines)
> Pushed with minor adjustments to synopsis and description, as well as a
> commit message.
>
> Thanks
Closed
?