Subject: Re: [bug#49946] [PATCH v7 29/32] gnu: Add rust-tree-sitter-for-emacs.

From: "(" <[email-masked]>
Date: Fri, 25 Nov 2022 07:17:55 +0000

On Fri Nov 25, 2022 at 1:21 AM GMT, Pierre Langlois wrote:
> * gnu/packages/tree-sitter.scm (rust-tree-sitter-for-emacs): New variable.
> * gnu/packages/patches/rust-tree-sitter-text-provider-fix.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.

> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm

> @@ -196,6 +197,19 @@ (define-public rust-tree-sitter
> +;; We need to apply a patch in order to compile the rust bindings against the
> +;; emacs tree-sitter module.
> +;; See https://github.com/tree-sitter/tree-sitter/pull/1294
> +(define-public rust-tree-sitter-for-emacs
> +  (package (inherit rust-tree-sitter)
> +    (source (origin
> +              (inherit (package-source rust-tree-sitter))
> +              (patches (search-patches
> +                        "rust-tree-sitter-text-provider-fix.patch"))))
> +    ;; Do not show this package in the UI as it's only meant to be used for
> +    ;; emacs's tree-sitter module.
> +    (properties '((hidden? . #t)))))

You can use ``hidden-package'', which is a bit nicer than ``properties''
imo:

  (hidden-package
   (package (inherit rust-tree-sitter)
     ...))

    -- (