[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

Debbugs page

Taiju HIGASHI wrote 3 years ago
(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
Taiju HIGASHI wrote 3 years ago
(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.
Liliana Marie Prikler wrote 3 years ago
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
Taiju HIGASHI wrote 3 years ago
[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
Taiju HIGASHI wrote 3 years ago
87y25gj3fc.fsf@taiju.info
Thanks for your review.
I've fixed it.
Taiju HIGASHI wrote 3 years ago
[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
Taiju HIGASHI wrote 3 years ago
(address . 51950@debbugs.gnu.org)
87tug4j2t8.fsf@taiju.info
I'm sorry. Unnecessary `append` was left in the file, so I removed it.
Liliana Marie Prikler wrote 3 years ago
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
Taiju HIGASHI wrote 3 years ago
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
?
Your comment

This issue is archived.

To comment on this conversation send an email to 51950@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 51950
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help