Skip to content

Commit

Permalink
Add changelog and Download page to nix
Browse files Browse the repository at this point in the history
  • Loading branch information
jopejoe1 committed Mar 23, 2024
1 parent a107fb8 commit 6494d2b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions repology/parsers/parsers/nix.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from typing import Any, Iterable

from repology.logger import Logger
from repology.package import PackageFlags
from repology.package import PackageFlags, LinkType
from repology.packagemaker import NameType, PackageFactory, PackageMaker
from repology.parsers import Parser
from repology.parsers.json import iter_json_dict
Expand Down Expand Up @@ -177,7 +177,13 @@ def iter_parse(self, path: str, factory: PackageFactory) -> Iterable[PackageMake
if re.match('[0-9a-f]*[a-f][0-9a-f]*$', pkg.version) and len(pkg.version) >= 7:
pkg.set_flags(PackageFlags.IGNORE)

pkg.add_homepages(meta.get('homepage'))
pkg.add_links(LinkType.UPSTREAM_HOMEPAGE, meta.get('homepage'))

if 'downloadPage' in meta:
pkg.add_links(LinkType.UPSTREAM_DOWNLOAD, meta.get('downloadPage'))

if 'changelog' in meta:
pkg.add_links(LinkType.UPSTREAM_CHANGELOG, meta.get('changelog'))

if 'description' in meta:
pkg.set_summary(meta['description'].replace('\n', ' '))
Expand Down

0 comments on commit 6494d2b

Please sign in to comment.