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

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 21 Nov 2021 09:54:47 +0100

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