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. https://github.com/skk-dev/ddskk/tree/master/nicola#42-nicola-ddskk-%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB (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. Taiju HIGASHI Taiju HIGASHI (1): gnu: Add emacs-ddskk-with-nicola gnu/packages/emacs-xyz.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.33.1
--- 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)) + (delete 'check))))))) + (define-public emacs-objed (package (name "emacs-objed") -- 2.33.1
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. https://github.com/skk-dev/ddskk/tree/master/nicola#42-nicola-ddskk-%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB (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.
duplicated bug#51949
Am Donnerstag, den 18.11.2021, 23:01 +0900 schrieb Taiju HIGASHI: > --- > 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. > + (delete 'check))))))) Again, use #:tests? and provide a comment as to why you're setting it to #f. Cheers
--- gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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
Thanks for your review. I've fixed it.
--- gnu/packages/emacs-xyz.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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
I'm sorry. Unnecessary `append` was left in the file, so I removed it.
Pushed with minor adjustments to synopsis and description, as well as a commit message. Thanks
Thank you for merge!
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> Pushed with minor adjustments to synopsis and description, as well as a
> commit message.
>
> Thanks