nvfetcher-0.7.0.0: Generate nix sources expr for the latest version of packages
Copyright(c) 2021-2022 berberman
LicenseMIT
Maintainerberberman <[email protected]>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

NvFetcher.Nvchecker

Description

nvchecker is a program checking new versions of packages. We encode the checking process into shake build system, generating configuration of nvchecker and calling it externally. Now we call nvchecker for each VersionSource, which seems not to be efficient, but it's tolerable when running in parallel.

Meanwhile, we lose the capabilities of tracking version updates, i.e. normally nvchecker will help us maintain a list of old versions, so that we are able to know which package's version is updated in this run. Fortunately, we can reimplement this in shake, see nvcheckerRule for details.

Synopsis

Types

data VersionSortMethod Source #

Constructors

ParseVersion 
Vercmp 

Instances

Instances details
Enum VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Generic VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep VersionSortMethod :: Type -> Type #

Show VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Binary VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Default VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

NFData VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: VersionSortMethod -> () #

Eq VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Ord VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Hashable VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Pretty VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

type Rep VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

type Rep VersionSortMethod = D1 ('MetaData "VersionSortMethod" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (C1 ('MetaCons "ParseVersion" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Vercmp" 'PrefixI 'False) (U1 :: Type -> Type))

data ListOptions Source #

Filter-like configuration for some version sources. See https://nvchecker.readthedocs.io/en/latest/usage.html#list-options for details.

Instances

Instances details
Generic ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep ListOptions :: Type -> Type #

Show ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Binary ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Default ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Methods

def :: ListOptions #

NFData ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: ListOptions -> () #

Eq ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Ord ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Hashable ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Pretty ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: ListOptions -> Doc ann #

prettyList :: [ListOptions] -> Doc ann #

type Rep ListOptions Source # 
Instance details

Defined in NvFetcher.Types

type Rep ListOptions = D1 ('MetaData "ListOptions" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (C1 ('MetaCons "ListOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_includeRegex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_excludeRegex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "_sortVersionKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe VersionSortMethod)) :*: S1 ('MetaSel ('Just "_ignored") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

data CheckVersion Source #

The input of nvchecker

Instances

Instances details
Generic CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep CheckVersion :: Type -> Type #

Show CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Binary CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

NFData CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: CheckVersion -> () #

Eq CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Ord CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Hashable CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Pretty CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: CheckVersion -> Doc ann #

prettyList :: [CheckVersion] -> Doc ann #

type Rep CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

type Rep CheckVersion = D1 ('MetaData "CheckVersion" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (C1 ('MetaCons "CheckVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VersionSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NvcheckerOptions)))
type RuleResult CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

data NvcheckerOptions Source #

Configuration available for evey version sourece. See https://nvchecker.readthedocs.io/en/latest/usage.html#global-options for details.

Instances

Instances details
Generic NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep NvcheckerOptions :: Type -> Type #

Show NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Binary NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Default NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

NFData NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: NvcheckerOptions -> () #

Eq NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Ord NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Hashable NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Pretty NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerOptions = D1 ('MetaData "NvcheckerOptions" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (C1 ('MetaCons "NvcheckerOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "_stripPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "_fromPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_toPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

data VersionSource Source #

Upstream version source for nvchecker to check

Instances

Instances details
Generic VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep VersionSource :: Type -> Type #

Show VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Binary VersionSource Source # 
Instance details

Defined in NvFetcher.Types

NFData VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: VersionSource -> () #

Eq VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Ord VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Hashable VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Pretty VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: VersionSource -> Doc ann #

prettyList :: [VersionSource] -> Doc ann #

type Rep VersionSource Source # 
Instance details

Defined in NvFetcher.Types

type Rep VersionSource = D1 ('MetaData "VersionSource" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (((C1 ('MetaCons "GitHubRelease" 'PrefixI 'True) (S1 ('MetaSel ('Just "_owner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_repo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "GitHubTag" 'PrefixI 'True) (S1 ('MetaSel ('Just "_owner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_repo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_listOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ListOptions))) :+: C1 ('MetaCons "Git" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vurl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_vbranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Branch)))) :+: ((C1 ('MetaCons "Pypi" 'PrefixI 'True) (S1 ('MetaSel ('Just "_pypi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ArchLinux" 'PrefixI 'True) (S1 ('MetaSel ('Just "_archpkg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "Aur" 'PrefixI 'True) (S1 ('MetaSel ('Just "_aur") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Manual" 'PrefixI 'True) (S1 ('MetaSel ('Just "_manual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))) :+: ((C1 ('MetaCons "Repology" 'PrefixI 'True) (S1 ('MetaSel ('Just "_repology") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_repo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "Webpage" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vurl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_regex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_listOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ListOptions))) :+: C1 ('MetaCons "HttpHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vurl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_regex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_listOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ListOptions))))) :+: ((C1 ('MetaCons "OpenVsx" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ovPublisher") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_ovExtName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "VscodeMarketplace" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vsmPublisher") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_vsmExtName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "Cmd" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vcmd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Container" 'PrefixI 'True) (S1 ('MetaSel ('Just "_vcontainer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_listOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ListOptions))))))

data NvcheckerResult Source #

The result of nvchecker rule

Constructors

NvcheckerResult 

Fields

Instances

Instances details
Generic NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep NvcheckerResult :: Type -> Type #

Show NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Binary NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

NFData NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: NvcheckerResult -> () #

Eq NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Hashable NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerResult = D1 ('MetaData "NvcheckerResult" "NvFetcher.Types" "nvfetcher-0.7.0.0-E76LQsRhWAxEniEZnhJWIT" 'False) (C1 ('MetaCons "NvcheckerResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "nvNow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: (S1 ('MetaSel ('Just "nvOld") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version)) :*: S1 ('MetaSel ('Just "nvStale") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

Rules

nvcheckerRule :: Rules () Source #

Rules of nvchecker

Functions

checkVersion :: VersionSource -> NvcheckerOptions -> PackageKey -> Action NvcheckerResult Source #

Run nvchecker given PackageKey Recording version changes and using stale version are available.