Contributing multiple dependent packages to nixpkgs

I’ve created a couple of new C library packages for nixpkgs, A, B, and C; where C depends on A,B and B depends on A. Each of them can be used on their own, but most likely people are interested in package C and don’t usually care about A,B directly. My goal of this was also having C available.

My question is, what is the recommended approach for adding such a set of packages to nixpkgs? Some approaches that come to mind:

  1. Create a separate PR for each package, get A merged first, then B, then finally C,
  2. Create a single PR with A,B,C commit chain,
  3. Create a single PR with one commit with all the packages.

1. or 2. depending on how “big” the depended packages are. If they’re just small libraries or something with little potential for issues, make it one PR but if they’re each significant additions, put them into separate PRs. If you have to ask, it’s probably 2.

Definitely don’t do 3., that’s never proper commit hygiene.

2 Likes

Option 2. seems most suitable from a pragmatic standpoint. In particular, successfully building and using library C is the most assuring test that A,B were built and are working correctly; while testing A or B individually – due to the lack of unit tests – could prove more challenging.

The libraries in question are:

So they aren’t exactly trivial but they are from a well-known source, quite stable, and have been around for decades.