kalamine
kalamine copied to clipboard
Build a package for the Nix package manager
As discussed on Discord, I am currently trying to package kalamine into Nix.
https://search.nixos.org/packages
I am not far from having finished but while trying to execute tests, I have a question. What is the exact goal of the layouts
directory? It contains sample layouts apparently. But is it because kalamine wants to have those layouts built alongside kalamine to provide them to users of kalamine, or is it just for testing purposes while running pytest
?
It is just that nix has got different phases in its build process. So I would like to know if the step kalamine layouts/*.toml
should be part of the build step or the test step. The main difference is that if it is part of the build, the resulted compiled layouts will be part of the outcome, alongside the binary. And so nix users will have them in the package directory on their system when installing the package.
Going even further, if they are part of the package, we can even add some instructions in the build recipe to copy them over to the correct directory /nix/store/<package_dir_when_installed>/usr/share/X11/xkb
. I am talking about Linux here. When using the full NixOS operating system, this could have the effect of having them directly available as default keyboard layouts (because /nix/store/<package_dir>/etc
will be more or less merged with /etc
, and this allows packages to contribute configurations).
So just to sum up, is this desired to have those layouts contributed as default-to-be-installed layouts, or are they just here for reference and for the tests?
Hope it makes sense even if you are not familiar with the nix ecosystem. Thanks
It seems there is a pull request for a nix kalamine package : https://github.com/NixOS/nixpkgs/issues/287971