| Copyright | (c) 2021 berberman |
|---|---|
| License | MIT |
| Maintainer | berberman <berberman@yandex.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
NvFetcher.Types
Description
Types used in this program.
Synopsis
- newtype Version = Version Text
- newtype Checksum = Checksum Text
- newtype Branch = Branch (Maybe Text)
- type NixExpr = Text
- data VersionChange = VersionChange {}
- newtype WithPackageKey k = WithPackageKey (k, PackageKey)
- data VersionSortMethod
- data ListOptions = ListOptions {}
- data VersionSource
- = GitHubRelease { }
- | GitHubTag {
- _owner :: Text
- _repo :: Text
- _listOptions :: ListOptions
- | Git { }
- | Pypi { }
- | ArchLinux { }
- | Aur { }
- | Manual { }
- | Repology { }
- | Webpage {
- _vurl :: Text
- _regex :: Text
- _listOptions :: ListOptions
- | HttpHeader {
- _vurl :: Text
- _regex :: Text
- _listOptions :: ListOptions
- data NvcheckerA = NvcheckerA {}
- data NvcheckerQ = NvcheckerQ VersionSource NvcheckerOptions
- data NvcheckerOptions = NvcheckerOptions {}
- data NixFetcher (k :: FetchStatus)
- = FetchGit {
- _furl :: Text
- _rev :: Version
- _deepClone :: Bool
- _fetchSubmodules :: Bool
- _leaveDotGit :: Bool
- _sha256 :: FetchResult k
- | FetchUrl {
- _furl :: Text
- _sha256 :: FetchResult k
- = FetchGit {
- type family FetchResult (k :: FetchStatus) where ...
- data FetchStatus
- data ExtractSrcQ = ExtractSrcQ (NixFetcher Fetched) [FilePath]
- data FetchRustGitDepsQ = FetchRustGitDepsQ (NixFetcher Fetched) FilePath
- data Core = Core
- type PackageName = Text
- type PackageFetcher = Version -> NixFetcher Fresh
- newtype PackageExtractSrc = PackageExtractSrc [FilePath]
- newtype PackageCargoFilePath = PackageCargoFilePath FilePath
- data Package = Package {}
- newtype PackageKey = PackageKey PackageName
Common types
Package version
Instances
| Eq Version Source # | |
| Ord Version Source # | |
| Show Version Source # | |
| IsString Version Source # | |
Defined in NvFetcher.Types Methods fromString :: String -> Version # | |
| Generic Version Source # | |
| Semigroup Version Source # | |
| Monoid Version Source # | |
| Hashable Version Source # | |
Defined in NvFetcher.Types | |
| ToJSON Version Source # | |
Defined in NvFetcher.Types | |
| FromJSON Version Source # | |
| Binary Version Source # | |
| NFData Version Source # | |
Defined in NvFetcher.Types | |
| ToNixExpr Version Source # | |
| type Rep Version Source # | |
Defined in NvFetcher.Types | |
Check sum, sha256, sri or base32, etc.
Instances
| Eq Checksum Source # | |
| Ord Checksum Source # | |
Defined in NvFetcher.Types | |
| Show Checksum Source # | |
| Generic Checksum Source # | |
| Hashable Checksum Source # | |
Defined in NvFetcher.Types | |
| Binary Checksum Source # | |
| NFData Checksum Source # | |
Defined in NvFetcher.Types | |
| type Rep Checksum Source # | |
Defined in NvFetcher.Types | |
Git branch (Nothing: master)
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
Constructors
| VersionChange | |
Instances
| Eq VersionChange Source # | |
Defined in NvFetcher.Types Methods (==) :: VersionChange -> VersionChange -> Bool # (/=) :: VersionChange -> VersionChange -> Bool # | |
| Show VersionChange Source # | |
Defined in NvFetcher.Types Methods showsPrec :: Int -> VersionChange -> ShowS # show :: VersionChange -> String # showList :: [VersionChange] -> ShowS # | |
newtype WithPackageKey k Source #
Decorate a rule's key with PackageKey
Constructors
| WithPackageKey (k, PackageKey) |
Instances
| Eq k => Eq (WithPackageKey k) Source # | |
Defined in NvFetcher.Types Methods (==) :: WithPackageKey k -> WithPackageKey k -> Bool # (/=) :: WithPackageKey k -> WithPackageKey k -> Bool # | |
| Show k => Show (WithPackageKey k) Source # | |
Defined in NvFetcher.Types Methods showsPrec :: Int -> WithPackageKey k -> ShowS # show :: WithPackageKey k -> String # showList :: [WithPackageKey k] -> ShowS # | |
| Hashable k => Hashable (WithPackageKey k) Source # | |
Defined in NvFetcher.Types | |
| Binary k => Binary (WithPackageKey k) Source # | |
Defined in NvFetcher.Types Methods put :: WithPackageKey k -> Put # get :: Get (WithPackageKey k) # putList :: [WithPackageKey k] -> Put # | |
| NFData k => NFData (WithPackageKey k) Source # | |
Defined in NvFetcher.Types Methods rnf :: WithPackageKey k -> () # | |
| type RuleResult (WithPackageKey k) Source # | |
Defined in NvFetcher.Types | |
Nvchecker types
data VersionSortMethod Source #
Constructors
| ParseVersion | |
| Vercmp |
Instances
data ListOptions Source #
Filter-like configuration for some version sources. See https://nvchecker.readthedocs.io/en/latest/usage.html#list-options for details.
Constructors
| ListOptions | |
Fields | |
Instances
data VersionSource Source #
Upstream version source for nvchecker to check
Constructors
| GitHubRelease | |
| GitHubTag | |
Fields
| |
| Git | |
| Pypi | |
| ArchLinux | |
| Aur | |
| Manual | |
| Repology | |
| Webpage | |
Fields
| |
| HttpHeader | |
Fields
| |
Instances
data NvcheckerA Source #
The result of running nvchecker
Constructors
| NvcheckerA | |
Instances
| Eq NvcheckerA Source # | |
Defined in NvFetcher.Types | |
| Show NvcheckerA Source # | |
Defined in NvFetcher.Types Methods showsPrec :: Int -> NvcheckerA -> ShowS # show :: NvcheckerA -> String # showList :: [NvcheckerA] -> ShowS # | |
| Generic NvcheckerA Source # | |
Defined in NvFetcher.Types Associated Types type Rep NvcheckerA :: Type -> Type # | |
| Hashable NvcheckerA Source # | |
Defined in NvFetcher.Types | |
| FromJSON NvcheckerA Source # | |
Defined in NvFetcher.Types | |
| Binary NvcheckerA Source # | |
Defined in NvFetcher.Types | |
| NFData NvcheckerA Source # | |
Defined in NvFetcher.Types Methods rnf :: NvcheckerA -> () # | |
| type Rep NvcheckerA Source # | |
Defined in NvFetcher.Types type Rep NvcheckerA = D1 ('MetaData "NvcheckerA" "NvFetcher.Types" "nvfetcher-0.3.0.0-inplace" 'False) (C1 ('MetaCons "NvcheckerA" 'PrefixI 'True) (S1 ('MetaSel ('Just "nvNow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "nvOld") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version)))) | |
data NvcheckerQ Source #
The input of nvchecker
Constructors
| NvcheckerQ VersionSource NvcheckerOptions |
Instances
data NvcheckerOptions Source #
Configuration available for evey version sourece. See https://nvchecker.readthedocs.io/en/latest/usage.html#global-options for details.
Constructors
| NvcheckerOptions | |
Fields
| |
Instances
Nix fetcher types
data NixFetcher (k :: FetchStatus) Source #
If the package is prefetched, then we can obtain the SHA256
Constructors
| FetchGit | |
Fields
| |
| FetchUrl | |
Fields
| |
Instances
type family FetchResult (k :: FetchStatus) where ... Source #
Prefetched fetchers hold hashes
Equations
| FetchResult Fresh = () | |
| FetchResult Fetched = Checksum |
ExtractSrc Types
data ExtractSrcQ Source #
Extract file contents from package source
e.g. Cargo.lock
Constructors
| ExtractSrcQ (NixFetcher Fetched) [FilePath] |
Instances
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.
Constructors
| FetchRustGitDepsQ (NixFetcher Fetched) FilePath |
Instances
Core types
The key type of nvfetcher rule. See NvFetcher.Core
Constructors
| Core |
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
newtype PackageExtractSrc Source #
Constructors
| PackageExtractSrc [FilePath] |
newtype PackageCargoFilePath Source #
Constructors
| PackageCargoFilePath FilePath |
A package is defined with:
- its name
- how to track its version
- how to fetch it as we have the version
- optional file paths to extract (dump to generated nix expr)
Cargo.lockpath (if it's a rust package)
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.
Constructors
| Package | |
Fields | |
newtype PackageKey Source #
Package key is the name of a package. We use this type to index packages.
Constructors
| PackageKey PackageName |