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

palp: correct metadata for repology #84666

Merged
merged 1 commit into from Apr 8, 2020
Merged

Conversation

jonringer
Copy link
Contributor

@jonringer jonringer commented Apr 7, 2020

Motivation for this change

should correlate with https://repology.org/project/palp/versions but instead fails during parsing:

2020-04-07 07:37:26   palp: ERROR: dropping, garbage name "palp-6d-2.1"
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@timokau
Copy link
Member

timokau commented Apr 7, 2020

Mh, I do think that having the number of dimensions in the derivation name is valuable. Can we maybe set pname to palp but still define a custom name with the dimensions included?

@timokau
Copy link
Member

timokau commented Apr 7, 2020

Long term it might be nice to add a meta entry for the repology name, since I think the usecase of encoding configuration information into the name is not uncommon and shouldn't be discouraged.

@jonringer
Copy link
Contributor Author

jonringer commented Apr 7, 2020

Mh, I do think that having the number of dimensions in the derivation name is valuable. Can we maybe set pname to palp but still define a custom name with the dimensions included?

I don't think so, because mkDerivation first checks for name, and uses it if available. However, I'm not super familiar with what affects the packages.json that gets consumed by repology. @ryantm

@jonringer
Copy link
Contributor Author

jonringer commented Apr 7, 2020

unfortunately, it is not possible:

master:

  "palp": {
    "name": "palp-6d-2.1",
    "pname": "palp",
    "version": "6d-2.1",

using pname + version + name:

  "palp": {
    "name": "palp-6d-2.1",
    "pname": "palp",
    "version": "6d-2.1",

using pname+version only (this PR):

  "palp": {
    "name": "palp-2.1",
    "pname": "palp",
    "version": "2.1",

@jonringer
Copy link
Contributor Author

if you want to reproduce, I found the command to create the packages.json:

nix-env -f . -I nixpkgs=$PWD -qa --json > packages.json

@timokau
Copy link
Member

timokau commented Apr 8, 2020

We should fix that. nix-env should be agnostic to how the derivation name is structured. Instead we should write a nix expression that uses lib.getName and lib.getVersion, which use pname and version if available.

I don't plan to work on that myself though, and for now having nixpkgs-update working is more important than a nice derivation name. Thanks for looking into this!

@timokau timokau merged commit b72fd98 into NixOS:master Apr 8, 2020
@jonringer jonringer deleted the repofy-palp branch April 8, 2020 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants