Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
best practice for Electron-based apps
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
_Razorblade_
n00b
n00b


Joined: 01 Jan 2004
Posts: 33

PostPosted: Sat Feb 04, 2023 12:46 pm    Post subject: best practice for Electron-based apps Reply with quote

I use several Electron-based apps, some have a binary ebuild already (i.e. Signal, Rocket.Chat) some don't (i.e. Joplin). For multiple reasons (consistent package management, increased execution speed due to host-optimized build options, increased trust by building from verifiable source) I would like to build these packages rather than relying on their binary builds (even if an ebuild is available, the binary is just stripped from an AppImage package).
Is there a best-practice for doing so? I saw several attempts to convert (or rather wrap) npm packages in ebuilds, but they all lack dependency management. One example is the eclass available in the neurogeek overlay.

The hurdle I'm currently struggling with is indeed dependency management when building from source:
Usually npm or yarn would be used interactively to satisfy the dependencies, but this would not result in reliable, predictable, reproducible builds and - as far as I know - contradict the Gentoo / ebuild concept.

So instead one could bundle all needed node_modules on a different system and pull them as additional source in the ebuild

I'm currently giving this a test drive by cloning the source repo at GitHub and running a GitHub Action to satisfy dependencies and storing node_modules as artifact.

A future problem may Chromium/Electron build-time. Standalone-Chromium seems to be very resource intensive, I'm currently using ccache in the hope to minimize build times, but I'm not sure if this would also help here as there would be different chromium build per app.

Any other recommendations are also highly appreciated!


C
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum