tarball: generate packages.json in nix#451424
Conversation
|
@jopejoe1 Thanks for looking into this! |
b013dfc to
e75c02e
Compare
e75c02e to
afb8b78
Compare
afb8b78 to
539fac6
Compare
|
Yes thank for this. |
539fac6 to
c6e7a97
Compare
|
Did a rebase and fixed a new eval failure in #478128 that got added since the last rebase. |
|
Wow, didn't watch this for a few weeks; the code has gotten pretty slim :) |
wolfgangwalther
left a comment
There was a problem hiding this comment.
I looked at the before/after diff again and now I only see two kinds of differences (although I did not check the full diff, it's huge):
- pname and version are split correctly
- some "new" packages appear, where they have multiple attr paths now ("aliases", but not behind allowAliases). For example
zulu21now appears, which is the same aszulu. The previousnix-envcall would have filtered out those duplicates.
The first one was the goal of this PR, I believe. To be clear: I consider the second one an improvement, because it was often unpredictable and confusing which attribute showed up and which didn't.
LGTM; but we should wait for the other PR, which contains the first commit, to merge first.
pname needs to always be evaluable so that our package index can be correctly generatedw
Instead of using nix-env, let's generate directly in Nix. This fixes the issue that version and pname contain the wrong information, as nix-env generates those by splitting name into version and pname instead of directly using those to attrs. This would work towards fixing the following issues: NixOS/nixos-search#770 repology/repology-updater#854
53b6840 to
e6fd126
Compare
|
Looks like this broke the parsing of repology (repology/repology-updater#1565) as they expect |
The |
|
Does it make sense to implement a workaround for |
|
Can you give a ilst of packages or script to get them? I'll try to fix it |
Currently not on my pc, but i pretty much toke the json file genrated by |
Can't we just revert this PR? |
|
I don't think a temporary fallback for pname is hard to do, I am looking into it right away. |
|
@qweered here is the list of packages missing Packages missing `pname` |
|
Nice thanks; is that something I can produce locally as well? |
Yes, but you need to revert e19bb69, so that my script works. Then you just need to run import json
with open('packages.json', 'r') as file:
data = json.load(file)
packages = data['packages']
for name ,package in packages.items():
if "pname" not in package.keys():
print(name) |
Instead of using nix-env, let's generate directly in Nix. This fixes the issue that version and pname contain the wrong information, as nix-env generates those by splitting name into version and pname instead of directly using those to attrs.
This would work towards fixing the following issues:
NixOS/nixos-search#770
repology/repology-updater#854
Note this depends on and includes changes from the following PRs, and only the last commit is for the changes in this PR:
#451244#451417#406555#455366#456539#478128Also currently depends on either #453291 or #453322 to fix the evaling broken in #421125Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.