Adding pkg-config metadata to Nixpkgs packages

See

The goal would be to crowdsource meta.pkgConfigModules (and tests`) for all the packages in that JSON file, so we can automate rather than hand curate it.

Please help out!

See also Tracking pkg-config info · Issue #1309 · repology/repology-updater · GitHub : Repology will hopefully do something with this information too!

7 Likes

Here is a useful sed script for anyone that wants to help out.

s/ \}:$/\n, testers\n}:/
s/^\}:$/, testers\n}:/
s/(stdenv.mkDerivation) (rec )?\{/\1 (finalAttrs: {/
/^  meta = (with lib; )?\{/i \ \ passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;\n
/^    platforms =/i \ \ \ \ pkgConfigModules = [ ];
s/^\}$/})/

(e.g. with sed -i -E -f pkg-config-modules.sed pkgs/development/libraries/openssl/default.nix)

How’s this going? This is really the first time I’ve had time to read into all of the PRs and discussions there.

2 Likes

It’s going well, but more crowd sourcing always helps!

1 Like

@eldritch_cookie has submitted a PR here: add pkgConfigModules metadata to some dependencies of gtk by eldritch-cookie · Pull Request #285125 · NixOS/nixpkgs · GitHub

2 Likes

In addition to pkg-config, will we do this in the future for packages that include other types of metadata (such as cmake and qmake project files)?

@Aleksanaa sounds good to me!