Skip to content

Conversation

@sternenseemann
Copy link
Member

No description provided.

@wolfgangwalther
Copy link
Contributor

I'm not exactly sure how pkgs/top-level/pkg-config/pkg-config-data.json in nixpkgs is created, but I can't find any of these two in there. Do you know why?

@sternenseemann
Copy link
Member Author

@wolfgangwalther manually. The data file is also duplicated with meta.pkgConfigModules. A while back, I started on a solution that would be able to (periodically) regenerate this data file from the meta sets elsewhere (since this is I think the best way to get ordinary maintainers involved in maintaining this list) with the plan to eventually integrate this into cabal2nix.

You can find it here: NixOS/nixpkgs#216488. If I remember correctly, it is basically finished, I just ran out of steam adding the missing meta.pkgConfigModules entries, so that no entry would be removed by the change. I also never got around to thinking about how to actually periodically, maybe even semi-automatically regenerating the file.

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the most detailed mapping here, but lgtm.

libNixName "libbrotlienc" = return "brotli"
libNixName "libbrotlidec" = return "brotli"
libNixName "libcurl" = return "curl"
libNixName "libglog" = return "glog"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has libglog.so file, but no pkgconfig/*.pc

libNixName "libzip" = return "libzip"
libNixName "libzmq" = return "zeromq"
libNixName "liquid" = return "liquid-dsp"
libNixName "llama" = return "llama-cpp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has llama.so file and pkgconfig/llama.pc

@roberth
Copy link
Member

roberth commented Aug 10, 2025

Not the most detailed mapping here

Unclear whether that should be a goal, or some other solution is to be preferred.

@roberth
Copy link
Member

roberth commented Aug 10, 2025

I'm co-responsible for the defaultPkgConfigPackages mapping in Nixpkgs.
It'd be a good fallback, but I'm not sure that it's a complete solution.
Specifically some packages contain multiple pkg-config modules, and it'd be preferable to consume those through a single package function argument attribute, so that a single override changes the whole group of modules.
Otherwise, we risk that an incomplete override of some of the pkg-config modules causes for example an ABI compatibility problem.

@sternenseemann sternenseemann merged commit 29867c9 into master Aug 10, 2025
8 checks passed
@sternenseemann sternenseemann deleted the more-names branch August 10, 2025 13:48
@sternenseemann
Copy link
Member Author

I guess you should not allow overriding modules, but instead resolved packages only (which is annoying in other situations though).

@roberth
Copy link
Member

roberth commented Aug 10, 2025

Something better could be created, but the interesting stuff won't happen within the broad callPackage area.
Probably the mapping in Nixpkgs needs to be more first-class instead of the already resolved attribute selections of defaultPkgConfigModules.
I'll "move" this to NixOS/nixpkgs#273815
Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants