Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking pkg-config info #1309

Open
Ericson2314 opened this issue Jan 12, 2023 · 27 comments
Open

Tracking pkg-config info #1309

Ericson2314 opened this issue Jan 12, 2023 · 27 comments

Comments

@Ericson2314
Copy link

I've long wanted a way to map pkg-config name to OS package that provide it. This seems close to what Repology is doing. Would it make sense to extend Repology with this functionality?

@AMDmi3
Copy link
Member

AMDmi3 commented Jan 12, 2023

Not sure how it can be done with big enough coverage to be useful. Repology does not work with package contents it could get info on pkgconfig file names from. Some repositories may contain list of files installed by packages we could look into, but I don't think there are many repositories like that. Will check tomorrow though.

@Ericson2314
Copy link
Author

Thanks for offering to check. I would be happy to propose add the requisite metadata to Nixpkgs if that helps you. (I am a Nixpkgs maintainer.)

@AMDmi3
Copy link
Member

AMDmi3 commented Jan 12, 2023

Well I've grepped gdk-pixbuf-2.0.pc in all text format repositories data and all I've got is adelie/alpine and macports using pkgconfig names as dependencies. Unfortunately we can't work with that.

I would be happy to propose add the requisite metadata to Nixpkgs if that helps you. (I am a Nixpkgs maintainer.)

If you propose to publish pkgconfig names for nix (and I suppose use these to map pkgconfig files to package names for all other repos), that should be easy to implement in repology.

@Ericson2314
Copy link
Author

Thanks for the quick response, and willingness to "bootstrap" off just one distro's metadata!

@Artturin
Copy link

Fedora allows its packages to depend on pc files https://docs.fedoraproject.org/en-US/packaging-guidelines/PkgConfigBuildRequires/

Though the only way they declare what pc file a package provides is https://src.fedoraproject.org/rpms/libproxy/blob/rawhide/f/libproxy.spec#_206

@Artturin
Copy link

Artturin commented Feb 1, 2023

We now have https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/pkg-config/pkg-config-data.json by @roberth

@roberth
Copy link

roberth commented Feb 1, 2023

We might want to iterate on the format, but Nixpkgs has at least made a start with this.

@AMDmi3
Copy link
Member

AMDmi3 commented Feb 1, 2023

The main requirement is for it to be in the same file with other package info.

@Ericson2314
Copy link
Author

Ericson2314 commented Feb 1, 2023

@AMDmi3 what file is that? I do not know how Repology gets info from Nixpkgs today.

@Ericson2314
Copy link
Author

@Ericson2314
Copy link
Author

OK since NixOS/nixpkgs#214304 we have

 $ nix-env -qaP -f . -A zlib --json --meta | jq
{
  "zlib": {
    "name": "zlib-1.2.13",
    ...
    "meta": {
      ...
      "pkgConfigModules": [
        "zlib"
      ],
  },
  ...
}

And hopefully by the time Repology ingests this (as part ofthe package.json) there will be more packages than zlib with this metadata :).

@Ericson2314
Copy link
Author

NixOS/nixpkgs#215056 Put up a PR marking a few more. Also made an Nixpkgs announcement in https://discourse.nixos.org/t/adding-pkg-config-metadata-to-nixpkgs-packages/25281 .

@AMDmi3 AMDmi3 transferred this issue from repology/repology-rules Feb 7, 2023
@AMDmi3
Copy link
Member

AMDmi3 commented Feb 7, 2023

Is this not yet in packages-unstable.json?

@Ericson2314
Copy link
Author

Hehe you move quick :) Yeah nixpkgs-unstable.json is regenerated only periodically, so it might not be in there yet.

@Ericson2314
Copy link
Author

I am investigating

@Ericson2314
Copy link
Author

Actually I do see it

cat /nix/store/1c50winfp4gri15d4zh3fv9f4jx64g02-nixpkgs-tarball-23.05pre452319.747927516ef/packages.json.br \
  | brotli -d \
  | jq '.packages.zlib.meta.pkgConfigModules'
[
  "zlib"
]

from https://hydra.nixos.org/build/208234249#tabs-summary in the most recent eval.

@Ericson2314
Copy link
Author

https://channels.nixos.org/nixos-unstable-small is quick enough to have it

curl https://releases.nixos.org/nixos/unstable-small/nixos-23.05pre452282.b6eac37960e/packages.json.br \
  | brotli -d \
  | jq '.packages.zlib.meta.pkgConfigModules'

@Ericson2314
Copy link
Author

Ericson2314 commented Feb 9, 2023

OK https://channels.nixos.org/nixpkgs-unstable has updated, and now has at least the zlib pkgConfigModules metadata!

@AMDmi3
Copy link
Member

AMDmi3 commented Feb 9, 2023

I've seen, thank you. Backend code is already done.

@Ericson2314
Copy link
Author

Ericson2314 commented Feb 9, 2023

You're wonderfully on top of things! :) Impressive!

@Ericson2314
Copy link
Author

@AMDmi3 Sorry to prod, but did this go live yet?

@AMDmi3
Copy link
Member

AMDmi3 commented Mar 2, 2023

Not yet. Sorry, ENOTIME at the moment.

@Ericson2314
Copy link
Author

Ericson2314 commented Mar 2, 2023

OK. Thanks for letting me know. Let me know if there is something I can do to help.

@Ericson2314
Copy link
Author

Hi, checking in on this again :)

@Artturin
Copy link

Artturin commented Nov 4, 2023

Ping

@AMDmi3
Copy link
Member

AMDmi3 commented Nov 5, 2023

ENOTIME for it

@Ericson2314
Copy link
Author

Oh just saw your reply. Is there any way some could do this for you without making it just as much work on your end?

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

No branches or pull requests

4 participants