nvfetcher-0.5.0.0: Generate nix sources expr for the latest version of packages
Copyright(c) 2021-2022 berberman
LicenseMIT
Maintainerberberman <berberman@yandex.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

NvFetcher.Nvchecker

Contents

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

Eq VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Ord VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Show VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Generic VersionSortMethod Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep VersionSortMethod :: Type -> Type #

Hashable 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 -> () #

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.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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
Eq ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Ord ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Show ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Generic ListOptions Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep ListOptions :: Type -> Type #

Hashable 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 -> () #

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.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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
Eq CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Ord CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Show CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Generic CheckVersion Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep CheckVersion :: Type -> Type #

Hashable 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 -> () #

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.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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
Eq NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Ord NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Show NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Generic NvcheckerOptions Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep NvcheckerOptions :: Type -> Type #

Hashable 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 -> () #

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.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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
Eq VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Ord VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Show VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Generic VersionSource Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep VersionSource :: Type -> Type #

Hashable 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 -> () #

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.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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))))))

data NvcheckerResult Source #

The result of nvchecker rule

Constructors

NvcheckerResult 

Fields

Instances

Instances details
Eq NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Show NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Generic NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep NvcheckerResult :: Type -> Type #

Hashable 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 -> () #

type Rep NvcheckerResult Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerResult = D1 ('MetaData "NvcheckerResult" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" '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

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

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