Derivation for an emacs package which requires a rust build

Hi, I am new to using Nixos. I was hoping to write a derivation for the LSPCE package for emacs. This requires building the lspce-module Rust library included in the same repository. I gathered from various mentions that the trivialBuild function from emacsWithPackages can be used to build emacs packages from source, but I cannot figure out how to perform the Rust build as part of this process. Any guidance would be greatly appreciated.

I think we do have lspce package under manual-packages, here.

So you can just

emacs.withPackages (epkgs: [ epkgs.lspce ])

will work.

The problem here is that the nixpgs derivation has not been updated and so you have to create a package

Thanks very much! Besides being able to use it directly, the source code for that derivation is also quite instructive.

1 Like

@cryslith Have you managed to use a later version of lspce and if so how did you do that as I would like to do similar.