Lektor : build the admin panel


I’m finally trying to build package in Nixos, and for sure I didn’t achieve my goal yet. Is is possible to have some help?

My goal is to update the ‘Lektor’ package, and to build the “admin” panel.

The Lektor is a python package, and for the moment the buildPythonPackage is use in the nixpkgs. I easily update the version, and it seems to work well.
The second part is more complex, my goal is to execute these two lines of code :

npm install .
npm run webpack

in the lektor/admin repository. So yes, I need to run nodejs during a python installation, and I don’t know how to achieve it.
I play a little with the different phase (postConfigure and pre/postBuild), and try to execute npm or npm2nix then nix-shell but I don’t really understand what I’m doing, so it is not working.

Is it possible to have some clues? (or even the solution :wink: ).

I imagine that must be possible in the “postBuild” to execute some command on the $out folder?

Thank you in advance,


Since it’s Webpacked you should be able to build the GUI separately (as a regular Node package), and then symlink in the build outputs (which lektor/webpack.config.js at 723e9ecd97a305f128de369a4466a2863307b31a · lektor/lektor · GitHub conveniently enough claims will all be in a gen/ subfolder).