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.Types

Description

Types used in this program.

Synopsis

Common types

newtype Version Source #

Package version

Constructors

Version Text 

Instances

Instances details
Eq Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Ord Version Source # 
Instance details

Defined in NvFetcher.Types

Show Version Source # 
Instance details

Defined in NvFetcher.Types

IsString Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

fromString :: String -> Version #

Generic Version Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Semigroup Version Source # 
Instance details

Defined in NvFetcher.Types

Monoid Version Source # 
Instance details

Defined in NvFetcher.Types

Hashable Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

ToJSON Version Source # 
Instance details

Defined in NvFetcher.Types

FromJSON Version Source # 
Instance details

Defined in NvFetcher.Types

Binary Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

NFData Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: Version -> () #

Pretty Version Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: Version -> Doc ann #

prettyList :: [Version] -> Doc ann #

ToNixExpr Version Source # 
Instance details

Defined in NvFetcher.NixExpr

type Rep Version Source # 
Instance details

Defined in NvFetcher.Types

type Rep Version = D1 ('MetaData "Version" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'True) (C1 ('MetaCons "Version" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype Checksum Source #

Check sum, sha256, sri or base32, etc.

Constructors

Checksum Text 

Instances

Instances details
Eq Checksum Source # 
Instance details

Defined in NvFetcher.Types

Ord Checksum Source # 
Instance details

Defined in NvFetcher.Types

Show Checksum Source # 
Instance details

Defined in NvFetcher.Types

Generic Checksum Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep Checksum :: Type -> Type #

Methods

from :: Checksum -> Rep Checksum x #

to :: Rep Checksum x -> Checksum #

Hashable Checksum Source # 
Instance details

Defined in NvFetcher.Types

Methods

hashWithSalt :: Int -> Checksum -> Int #

hash :: Checksum -> Int #

ToJSON Checksum Source # 
Instance details

Defined in NvFetcher.Types

FromJSON Checksum Source # 
Instance details

Defined in NvFetcher.Types

Binary Checksum Source # 
Instance details

Defined in NvFetcher.Types

Methods

put :: Checksum -> Put #

get :: Get Checksum #

putList :: [Checksum] -> Put #

NFData Checksum Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: Checksum -> () #

Pretty Checksum Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: Checksum -> Doc ann #

prettyList :: [Checksum] -> Doc ann #

type Rep Checksum Source # 
Instance details

Defined in NvFetcher.Types

type Rep Checksum = D1 ('MetaData "Checksum" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'True) (C1 ('MetaCons "Checksum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype Branch Source #

Git branch (Nothing: master)

Constructors

Branch (Maybe Text) 

Instances

Instances details
Eq Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

(==) :: Branch -> Branch -> Bool #

(/=) :: Branch -> Branch -> Bool #

Ord Branch Source # 
Instance details

Defined in NvFetcher.Types

Show Branch Source # 
Instance details

Defined in NvFetcher.Types

Generic Branch Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep Branch :: Type -> Type #

Methods

from :: Branch -> Rep Branch x #

to :: Rep Branch x -> Branch #

Hashable Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

hashWithSalt :: Int -> Branch -> Int #

hash :: Branch -> Int #

Binary Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

put :: Branch -> Put #

get :: Get Branch #

putList :: [Branch] -> Put #

Default Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

def :: Branch #

NFData Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: Branch -> () #

Pretty Branch Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: Branch -> Doc ann #

prettyList :: [Branch] -> Doc ann #

type Rep Branch Source # 
Instance details

Defined in NvFetcher.Types

type Rep Branch = D1 ('MetaData "Branch" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'True) (C1 ('MetaCons "Branch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

type NixExpr = Text Source #

Nix expression

data VersionChange Source #

Version change of a package

>>> VersionChange "foo" Nothing "2.3.3"
foo: ∅ → 2.3.3
>>> VersionChange "bar" (Just "2.2.2") "2.3.3"
bar: 2.2.2 → 2.3.3

Instances

Instances details
Eq VersionChange Source # 
Instance details

Defined in NvFetcher.Types

Show VersionChange Source # 
Instance details

Defined in NvFetcher.Types

newtype WithPackageKey k Source #

Decorate a rule's key with PackageKey

Constructors

WithPackageKey (k, PackageKey) 

Instances

Instances details
Eq k => Eq (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

Show k => Show (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

Hashable k => Hashable (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

Binary k => Binary (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

NFData k => NFData (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: WithPackageKey k -> () #

type RuleResult (WithPackageKey k) Source # 
Instance details

Defined in NvFetcher.Types

Nvchecker 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 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))))

newtype NvcheckerRaw Source #

Parsed JSON output from nvchecker

Constructors

NvcheckerRaw Version 

Instances

Instances details
Eq NvcheckerRaw Source # 
Instance details

Defined in NvFetcher.Types

Show NvcheckerRaw Source # 
Instance details

Defined in NvFetcher.Types

Generic NvcheckerRaw Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep NvcheckerRaw :: Type -> Type #

FromJSON NvcheckerRaw Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerRaw Source # 
Instance details

Defined in NvFetcher.Types

type Rep NvcheckerRaw = D1 ('MetaData "NvcheckerRaw" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'True) (C1 ('MetaCons "NvcheckerRaw" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))

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 UseStaleVersion Source #

Using stale value indicates that we will NOT check for new versions if there is a known version recoverd from json file or last use of the rule. Normally you don't want a stale version unless you need pin a package.

Constructors

PermanentStale

Specified in configuration file

TemporaryStale

Specified by --filter command

NoStale 

Instances

Instances details
Eq UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Ord UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Show UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Generic UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep UseStaleVersion :: Type -> Type #

Hashable UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Binary UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

NFData UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: UseStaleVersion -> () #

type Rep UseStaleVersion Source # 
Instance details

Defined in NvFetcher.Types

type Rep UseStaleVersion = D1 ('MetaData "UseStaleVersion" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'False) (C1 ('MetaCons "PermanentStale" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TemporaryStale" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoStale" 'PrefixI 'False) (U1 :: Type -> Type)))

Nix fetcher types

data NixFetcher (k :: FetchStatus) Source #

If the package is prefetched, then we can obtain the SHA256

Instances

Instances details
Eq (FetchResult k) => Eq (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

(==) :: NixFetcher k -> NixFetcher k -> Bool #

(/=) :: NixFetcher k -> NixFetcher k -> Bool #

Ord (FetchResult k) => Ord (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Show (FetchResult k) => Show (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Generic (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep (NixFetcher k) :: Type -> Type #

Methods

from :: NixFetcher k -> Rep (NixFetcher k) x #

to :: Rep (NixFetcher k) x -> NixFetcher k #

Hashable (FetchResult k) => Hashable (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

hashWithSalt :: Int -> NixFetcher k -> Int #

hash :: NixFetcher k -> Int #

ToJSON (NixFetcher 'Fetched) Source # 
Instance details

Defined in NvFetcher.Types

Binary (FetchResult k) => Binary (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

put :: NixFetcher k -> Put #

get :: Get (NixFetcher k) #

putList :: [NixFetcher k] -> Put #

NFData (FetchResult k) => NFData (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: NixFetcher k -> () #

Pretty (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: NixFetcher k -> Doc ann #

prettyList :: [NixFetcher k] -> Doc ann #

ToNixExpr (NixFetcher 'Fresh) Source # 
Instance details

Defined in NvFetcher.NixExpr

ToNixExpr (NixFetcher 'Fetched) Source # 
Instance details

Defined in NvFetcher.NixExpr

type Rep (NixFetcher k) Source # 
Instance details

Defined in NvFetcher.Types

type Rep (NixFetcher k) = D1 ('MetaData "NixFetcher" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'False) ((C1 ('MetaCons "FetchGit" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_furl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_rev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "_deepClone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "_fetchSubmodules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_leaveDotGit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_sha256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FetchResult k))))) :+: C1 ('MetaCons "FetchGitHub" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_fowner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_frepo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "_rev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "_deepClone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "_fetchSubmodules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_leaveDotGit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_sha256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FetchResult k)))))) :+: (C1 ('MetaCons "FetchUrl" 'PrefixI 'True) (S1 ('MetaSel ('Just "_furl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_sha256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FetchResult k)))) :+: C1 ('MetaCons "FetchTarball" 'PrefixI 'True) (S1 ('MetaSel ('Just "_furl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_sha256") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FetchResult k)))))
type RuleResult (NixFetcher 'Fresh) Source # 
Instance details

Defined in NvFetcher.Types

type family FetchResult (k :: FetchStatus) where ... Source #

Prefetched fetchers hold hashes

data FetchStatus Source #

Fetch status

Constructors

Fresh 
Fetched 

ExtractSrc Types

data ExtractSrcQ Source #

Extract file contents from package source e.g. Cargo.lock

Instances

Instances details
Eq ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Ord ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Show ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Generic ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep ExtractSrcQ :: Type -> Type #

Hashable ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Binary ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

NFData ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: ExtractSrcQ -> () #

Pretty ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: ExtractSrcQ -> Doc ann #

prettyList :: [ExtractSrcQ] -> Doc ann #

ToNixExpr ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.NixExpr

type Rep ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

type Rep ExtractSrcQ = D1 ('MetaData "ExtractSrcQ" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'False) (C1 ('MetaCons "ExtractSrcQ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NixFetcher 'Fetched)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty FilePath))))
type RuleResult ExtractSrcQ Source # 
Instance details

Defined in NvFetcher.Types

FetchRustGitDeps types

data FetchRustGitDepsQ Source #

Fetch outputHashes for git dependencies in Cargo.lock. See https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#importing-a-cargolock-file for details. We need fetched source and the file path to Cargo.lock.

Instances

Instances details
Eq FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Ord FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Show FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Generic FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep FetchRustGitDepsQ :: Type -> Type #

Hashable FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Binary FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

NFData FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: FetchRustGitDepsQ -> () #

Pretty FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

type Rep FetchRustGitDepsQ Source # 
Instance details

Defined in NvFetcher.Types

type Rep FetchRustGitDepsQ = D1 ('MetaData "FetchRustGitDepsQ" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'False) (C1 ('MetaCons "FetchRustGitDepsQ" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NixFetcher 'Fetched)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))
type RuleResult FetchRustGitDepsQ Source #

outputHashes, a mapping from nameVer -> output hash

Instance details

Defined in NvFetcher.Types

Core types

data Core Source #

The key type of nvfetcher rule. See NvFetcher.Core

Constructors

Core 

Instances

Instances details
Eq Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

(==) :: Core -> Core -> Bool #

(/=) :: Core -> Core -> Bool #

Ord Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

compare :: Core -> Core -> Ordering #

(<) :: Core -> Core -> Bool #

(<=) :: Core -> Core -> Bool #

(>) :: Core -> Core -> Bool #

(>=) :: Core -> Core -> Bool #

max :: Core -> Core -> Core #

min :: Core -> Core -> Core #

Show Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

showsPrec :: Int -> Core -> ShowS #

show :: Core -> String #

showList :: [Core] -> ShowS #

Generic Core Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep Core :: Type -> Type #

Methods

from :: Core -> Rep Core x #

to :: Rep Core x -> Core #

Hashable Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

hashWithSalt :: Int -> Core -> Int #

hash :: Core -> Int #

Binary Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

put :: Core -> Put #

get :: Get Core #

putList :: [Core] -> Put #

NFData Core Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: Core -> () #

type Rep Core Source # 
Instance details

Defined in NvFetcher.Types

type Rep Core = D1 ('MetaData "Core" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'False) (C1 ('MetaCons "Core" 'PrefixI 'False) (U1 :: Type -> Type))
type RuleResult Core Source # 
Instance details

Defined in NvFetcher.Types

Package types

type PackageName = Text Source #

Package name, used in generating nix expr

type PackageFetcher = Version -> NixFetcher Fresh Source #

How to create package source fetcher given a version

data Package Source #

A package is defined with:

  1. its name
  2. how to track its version
  3. how to fetch it as we have the version
  4. optional file paths to extract (dump to build dir)
  5. optional Cargo.lock path (if it's a rust package)
  6. an optional pass through map
  7. if the package version was pinned

INVARIANT: Version passed to PackageFetcher MUST be used textually, i.e. can only be concatenated with other strings, in case we can't check the equality between fetcher functions.

newtype PackageKey Source #

Package key is the name of a package. We use this type to index packages.

Constructors

PackageKey PackageName 

Instances

Instances details
Eq PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Ord PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Show PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Generic PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep PackageKey :: Type -> Type #

Hashable PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Binary PackageKey Source # 
Instance details

Defined in NvFetcher.Types

NFData PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: PackageKey -> () #

Pretty PackageKey Source # 
Instance details

Defined in NvFetcher.Types

Methods

pretty :: PackageKey -> Doc ann #

prettyList :: [PackageKey] -> Doc ann #

type Rep PackageKey Source # 
Instance details

Defined in NvFetcher.Types

type Rep PackageKey = D1 ('MetaData "PackageKey" "NvFetcher.Types" "nvfetcher-0.5.0.0-3yJjetg0q7IBedlVdRRp6j" 'True) (C1 ('MetaCons "PackageKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageName)))

data PackageResult Source #

Result type of Core

Constructors

PackageResult 

Fields

Instances

Instances details
Show PackageResult Source # 
Instance details

Defined in NvFetcher.Types

Generic PackageResult Source # 
Instance details

Defined in NvFetcher.Types

Associated Types

type Rep PackageResult :: Type -> Type #

ToJSON PackageResult Source # 
Instance details

Defined in NvFetcher.Types

NFData PackageResult Source # 
Instance details

Defined in NvFetcher.Types

Methods

rnf :: PackageResult -> () #

ToNixExpr PackageResult Source #

nix expr snippet like:

feeluown-core = {
    pname = "feeluown-core";
    version = "3.7.7";
    src = fetchurl {
      sha256 = "06d3j39ff9znqxkhp9ly81lcgajkhg30hyqxy2809yn23xixg3x2";
      url = "https://pypi.io/packages/source/f/feeluown/feeluown-3.7.7.tar.gz";
    };
    a = B;
  };
Instance details

Defined in NvFetcher.NixExpr

type Rep PackageResult Source # 
Instance details

Defined in NvFetcher.Types