I’ve been using nixos for a while, but mostly as an end-user and I am trying to slowly learn how to contribute. I would like to contribute an update for pdfstudio, which has a new version each year. pdfstudio2021, pdfstudio2022, etc. are defined in all-packages.nix
and use callPackage
to call the same code with different parameters for the different years. I created a pull request to add pdfstudio2024 and it worked locally but failed the CI because of the check to add it to pkgs/by-name
.
I have since figured out how to make it work under pkgs/by-name
, but as far as I can tell, it isn’t possible to reuse the same code for each version, rather that a separate directory will be needed for each version. This discussion seems to confirm that pkgs/by-name can’t handle multiple versions, but before I submit a new pull request I wanted to check that I was approaching this in the right way. If this is the right thing to do, this would mean that the older versions would be in all-packages.nix
and under the old hierarchy, while this version would be under pkgs/by-name
.
Is this the correct thing to do?