Open ScottFreeCode opened 2 years ago
(See also #190685 )
I'm not necessarily volunteering to maintain this yet (we'll have to see which system proves most useful for me), but I think I can package this once I figure out which Nix packages contain its dependencies. The libraries are listed very nicely in the build configuration JSON (as are some compiler flags that may or may not be needed), it's just a matter of finding their Nix names.
There are two ways it could be done: patch the official prebuilt binary (which are what's used by the commandline helper tool) or build from source (which looks easy judging from the JSON configuration).
If I'm reading the system right, we would need a patched version in order to:
(It also might be possible to apply the same patching we could do to the prebuilt binary, to bundled Neutralino apps out there. I'll have to find a good example or I can make one by using the bundler to bundle a non-NixOS instance of a hello-world app.)
It looks as though the bundler in the NPM commandline helper would use the prebuilt binaries, accomplishing the bundling equivalent of cross-compilation, and this being a Node package it might just run as-is even on NixOS (I have confirmed it is able to do so for commands that download the prebuilts and that attempt to run dev mode, which fails on the binary load due to the linker). In other words, I think it might be possible to run the bundler on NixOS and get packages that work for other OSes, without even patching anything. I have not tested this yet.
I think the packages to use are:
gdk-pixbuf
glib
gtk3
webkitgtk
xorg.libX11
xorg.libxcb
xorg.libXrandr
stdenv.cc.cc.lib
I'm not 100% certain howevr, and it is logging what looks like errors (although it also looks as though it basically works); I will see if I can find out if the errors are expected. If someone with more experience could compare the list of libraries to link in Neutralino's build configuration JSON with the above list of Nix packages and confirm if I've got the right selection, that would be great!
[EDIT: the accidental close was a wrong button trying to add a newline to the text of this comment. GitHub's UI might be a little over-eager with the keyboard or something.]
[comment: Neutralino is similar to Wails (added, #136707) and Tauri. Comparison at https://github.com/tauri-apps/tauri/discussions/3521 ]
Project description Build lightweight cross-platform desktop apps with JavaScript, HTML, and CSS
[comment: This description is lifted from the Neutralino homepage. Where Wails's is "Build applications using Go + HTML + CSS + JS", Neutralino if I understand correctly is similar but implemented in C++ and supporting extension in theoretically any language.]
Metadata