repology / repology-rules

Package normalization ruleset for Repology
https://repology.org
GNU General Public License v3.0
111 stars 129 forks source link

nixpkgs: most emacsPackages not detected as emacs:* #447

Closed Atemu closed 3 years ago

Atemu commented 3 years ago

They are instead listed as emacs-<pkgname>.

See for example:

https://repology.org/projects/?search=magit&maintainer=&category=&inrepo=&notinrepo=&repos=&families=&repos_newest=&families_newest=

https://repology.org/project/emacs:magit-annex/versions https://repology.org/project/emacs-magit-annex/versions

https://repology.org/projects/?search=emacs%3A&maintainer=&category=&inrepo=nix_unstable&notinrepo=&repos=&families=&repos_newest=&families_newest= (75) https://repology.org/projects/?search=emacs-&maintainer=&category=&inrepo=nix_unstable&notinrepo=&repos=&families=&repos_newest=&families_newest= (>200, likely the entire rest of the ~5000 emacsPackages)

AMDmi3 commented 3 years ago

Is it true that all packages from melpa are prefixed with emacs- in nix?

Atemu commented 3 years ago

Looks like it: https://github.com/NixOS/nixpkgs/blob/b0121fcb034234ef63bbab258b689f76ae0fe5d9/pkgs/build-support/emacs/generic.nix#L30

It would probably be better to just match packages that are an attribute of an emacsPackages set because those sets contain precisely what is says on the tin. Same goes for any other \<something>Packages in Nixpkgs, i.e. haskellPackages, rPackages, pythonPackages, luaPackages, nodePackages etc. etc.

We could also drop the versioned emacsPackages from the JSON and only keep the set for the current version if that helps.

AMDmi3 commented 3 years ago

It would probably be better to just match packages that are an attribute of an emacsPackages set because those sets contain precisely what is says on the tin.

Sure, but I need to know to be able to safely drop emacs- before adding emacs: in this case.

Atemu commented 3 years ago

There are about a dozen or so packages that don't start with emacs- but you'd probably only strip it if it's even there I assume.

My regex magic also tells me that the only emacsPackage with emacs- in its actual name is emacs-libvterm. It's a separate package from the regular libvterm but since it's going to become emacs:libvterm, that should work.

davidak commented 3 years ago

i think this problem is fixed.

the majority of packages start with emacs: and only 23 with emacs-.

@Atemu do i understand it correctly?

Atemu commented 3 years ago

Yup, only 4 or so packages are missing now.

We fixed it on our end.