Either two packages, or a single package containing both binaries (this would maybe be cleaner I think). An even cleaner method would be to provide some options to your derivation to enable one package or the other… but it’s slightly more complicated.
Yeah, you need to add yourself as a maintainer of the package (see below), and typically you are the one supposed to make updates, but as explained here https://github.com/NixOS/nixpkgs/tree/master/maintainers:
Unlike other packaging ecosystems, the maintainer doesn’t have exclusive control over the packages and modules they maintain. This more fluid approach is one reason why we scale to so many packages.
The main responsibility of a maintainer is to keep the packages they maintain in a functioning state, and keep up with updates. In order to do that, they are empowered to make decisions over the packages they maintain.
That being said, the maintainer is not alone proposing changes to the packages. Anybody (both bots and humans) can send PRs to bump or tweak the package.
Also, the nix community recommends:
We encourage people who care about a package to assign themselves as a maintainer. Commit access to the Nixpkgs repository is not required for that.
so if you heavily use these tools, you are the perfect candidate ![]()
Well, you are definitely young in this ecosystem, but you are not alone here. You will first need to submit a Pull Request, and then reviewers will be asked to review your contribution, and ask you to modify it until it is good enough to integrate in Nixpkgs. Turst me, reviewers will not allow a dirty code to get into the repository, so there is not much risk here… and that’s the beauty of Nix and its strength, everyone can maintain a package
And if you want to help, you can help people to review packages (at least by testing it), we are always in need of more reviewers.
First, are you familiar with git? (this is the tool that nix uses to allow many people to contribute as the same time) If not, you might like to play with https://ohmygit.org/, or just learn basic git clone yourforkOfNixgks, git add yourfile.nix, git commit -am "package: init at 1.0", git push… and it’s basically all you need before creating a PR from github’s website (a message will appear do you want to create a PR). So the rest is just about doing it right in nix.
So first, you need to add yourself as a maintainer: so just add an entry with your name in maintainers/maintainer-list.nix following other existing entries, and create a commit named like maintainers: add wolf with just this. Then, if your derivation does not need Qt, just put the derivation in something like nixpkgs/by-name/st/stereotool/package.nix (this is fairly new system, this way it is automatically added to the top level, otherwise if you put it in a category like nixpkgs/applications/audio/stereotool/default.nix, you need to add the derivation in pkgs/top-level/all-packages.nix). Then, you will also need to specify the source via an url, like fetchzip. You can check the documentation online… or sometimes it is simpler to just go to a clone of nixpkgs and type (after installing rg):
$ rg fetchzip -C 5
and it will print all codes containing fetchzip with 5 lines of context around. Practical to quickly see how people use it in practice etc. If you want to package multiple sources, you might like this explanation: How to create package with multiple sources? - #3 by rkoe To package also stuff for aarch64, darwin etc, you can use a dict like they did here nixpkgs/pkgs/applications/misc/1password-gui/default.nix at 185474c3ec482062b9978969c92c0635f80ab049 · NixOS/nixpkgs · GitHub
Note that you will need to add a meta entry in the above derivation, like:
meta = with lib; {
homepage = "https://github.com//";
description = "";
longDescription = ''
'';
license = licenses.unfree;
maintainers = with maintainers; [ putYourNameHereAsAddedInTheMaintainerFile ];
platforms = platforms.linux;
};
and, importantly, INDENT your code correctly. If you use any decent editor, there is often a way to indent your code more or less automatically. For instance, in Kate, that typically comes with KDE by default:

If you want to read more, there is:
- my tutorial packaging - How to package my software in nix or write my own package derivation for nixpkgs - Unix & Linux Stack Exchange
- nix/nixpkgs/nixos manuals (warning there are 3!), like Nixpkgs Reference Manual NixOS Manual and Introduction - Nix Reference Manual
- GitHub - NixOS/nixpkgs: Nix Packages collection & NixOS where you can find countless examples, combine with
rg/fdfor great efficiency.