Strong opinion: Library packaging

Bah, I missed the edit there.

The idea, from defaultGemConfig would be to do something like

{ 
  libraryname = {
    "13.17.1": {
      source = "github",
      sha256 = "...",
      #...,
    };
    #...
  };
}

and elsewhere (e.g. language.overrides):

{
  libraryname = attrs: {
    buildInputs = [libzip, sqlite, libxml2];
  };
}

The langInputs function would be responsible for fetching from the former, setting up a derivation, and then passing the derivation to the latter function to have e.g. buildInputs provided, and then merged.

The motivation here is two-fold:

First, that kind of variation from a “simple” library package tends to be true over the lifetime of the library. The example that @manveru gave of Nokogiri needing the same build configuration for more than 10 years… The attrs argument is sufficent, I think, to do one offs or “only add these buildInputs after version X” or whatever behavior.

And second, those variations are generally not something that a tool can determine automatically. So the overrides.nix file would need to be maintained by humans anyway, but at a much lower rate of change.