Repository navigation
feat(packaging): update nix package to build from source instead - #1
Conversation
|
Thank you for your PR. This is my first time working on Nix packaging, so I appreciate the help and feedback. And I tested the source-built package and the desktop application works properly. One thing I noticed is that I couldn't find the bundled Have you tested the CLI installation flow from Settings -> CLI -> Install? On my side, when testing the AppImage-based package, I had to do some additional work to make the bundled CLI function correctly on NixOS. The upstream project ships both the desktop application and the |
|
The CLI wasn't meant to be bundled in this package as it is only for the desktop client. I don't think we'd want to bundle the CLI since (at least for me) it was not installed by default. The CLI after installation from Settings -> CLI -> Install works when launched from But from what I've seen the CLI is usually bundled as a separate package. For example in Joplin (which is a similar app) there are two separate packages for desktop and CLI. I propose we solve it the same way. Also it makes it better if we make a Nix module, which could look like this for example: programs.zennotes = {
desktop.enable = true; # Enable desktop client
cli.enable = true; # Enable CLI
};Which could be extended to: programs.zennotes = {
desktop = {
enable = true;
package = pkgs.zennotes-desktop; # Specify the package
};
cli = {
enable = true;
package = pkgs.zennotes-cli;
};
web = {
# ...
};
server = {
# ...
};
}; |
|
Thank you for your explanation and for taking the time to improve the package. This is my first contribution related to Nix packaging, so I'm still learning the conventions and best practices around packaging Nix and nixpkgs. Your explanation about separating desktop and CLI packages, as well as the comparison with Joplin makes a lot of sense. I also like the idea of a future NixOS module that can manage the different ZenNotes components in a more declarative way. I'll go ahead and approve and merge your changes into my branch so the upstream PR can benefit from your implementation. |
Since AppImage files are meant to be used if traditional packaging from source is infeasible according to NixOS manual (https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools) and it limits the package to
x86_64-linux. I rewrote the package to build the app from source instead.