| Copyright | (c) Colin Woodbury 2012 - 2021 |
|---|---|
| License | GPL3 |
| Maintainer | Colin Woodbury <colin@fosskers.ca> |
| Safe Haskell | None |
| Language | Haskell2010 |
Aura.Types
Description
Core Aura types.
Synopsis
- data Package
- pname :: Package -> PkgName
- pprov :: Package -> Provides
- pver :: Package -> Versioning
- dividePkgs :: NonEmpty Package -> These (NonEmpty Prebuilt) (NonEmpty Buildable)
- data Dep = Dep {
- dName :: !PkgName
- dDemand :: !VersionDemand
- parseDep :: Text -> Maybe Dep
- renderedDep :: Dep -> Text
- data Buildable = Buildable {}
- data Prebuilt = Prebuilt {}
- data SimplePkg = SimplePkg {
- spName :: !PkgName
- spVersion :: !Versioning
- simplepkg :: PackagePath -> Maybe SimplePkg
- simplepkg' :: Text -> Maybe SimplePkg
- bToSP :: Buildable -> SimplePkg
- pToSP :: Prebuilt -> SimplePkg
- class Flagable a where
- data VersionDemand
- _VersionDemand :: Traversal' VersionDemand Versioning
- data InstallType
- data DepError
- = NonExistant !PkgName !PkgName
- | VerConflict !(Doc AnsiStyle)
- | Ignored !(Doc AnsiStyle)
- | BrokenProvides !PkgName !Provides !PkgName
- data Failure
- newtype FailMsg = FailMsg {}
- data Language
- newtype PkgName = PkgName {}
- newtype PkgGroup = PkgGroup {}
- newtype Provides = Provides {}
- data PackagePath
- packagePath :: FilePath -> Maybe PackagePath
- ppPath :: PackagePath -> FilePath
- newtype Pkgbuild = Pkgbuild {}
- type Environment = Map Text Text
- newtype User = User {}
Package Types
pprov :: Package -> Provides Source #
Other names which allow this Package to be satisfied as a dependency.
A dependency on another package.
Constructors
| Dep | |
Fields
| |
Instances
| Eq Dep Source # | |
| Ord Dep Source # | |
| Show Dep Source # | |
| Generic Dep Source # | |
| type Rep Dep Source # | |
Defined in Aura.Types type Rep Dep = D1 ('MetaData "Dep" "Aura.Types" "aura-3.2.9-2s19zX6zRkNHYYiSz49mYF" 'False) (C1 ('MetaCons "Dep" 'PrefixI 'True) (S1 ('MetaSel ('Just "dName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PkgName) :*: S1 ('MetaSel ('Just "dDemand") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VersionDemand))) | |
parseDep :: Text -> Maybe Dep Source #
Parse a dependency entry as it would appear in a PKGBUILD:
>>> parseDep "pacman>1.2.3"
Just (Dep {name = PkgName {name = "pacman"}, demand = >1.2.3})
renderedDep :: Dep -> Text Source #
A Package from the AUR that's buildable in some way on the user's machine.
Constructors
| Buildable | |
Instances
A prebuilt Package from the official Arch repositories.
Constructors
| Prebuilt | |
Instances
| Eq Prebuilt Source # | |
| Ord Prebuilt Source # | |
Defined in Aura.Types | |
| Show Prebuilt Source # | |
| Generic Prebuilt Source # | |
| type Rep Prebuilt Source # | |
Defined in Aura.Types type Rep Prebuilt = D1 ('MetaData "Prebuilt" "Aura.Types" "aura-3.2.9-2s19zX6zRkNHYYiSz49mYF" 'False) (C1 ('MetaCons "Prebuilt" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PkgName) :*: S1 ('MetaSel ('Just "pVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Versioning)) :*: (S1 ('MetaSel ('Just "pBase") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PkgName) :*: S1 ('MetaSel ('Just "pProvides") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Provides)))) | |
A package name with its version number.
Constructors
| SimplePkg | |
Fields
| |
Instances
| Eq SimplePkg Source # | |
| Ord SimplePkg Source # | |
| Show SimplePkg Source # | |
| Generic SimplePkg Source # | |
| type Rep SimplePkg Source # | |
Defined in Aura.Types type Rep SimplePkg = D1 ('MetaData "SimplePkg" "Aura.Types" "aura-3.2.9-2s19zX6zRkNHYYiSz49mYF" 'False) (C1 ('MetaCons "SimplePkg" 'PrefixI 'True) (S1 ('MetaSel ('Just "spName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PkgName) :*: S1 ('MetaSel ('Just "spVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Versioning))) | |
simplepkg :: PackagePath -> Maybe SimplePkg Source #
Attempt to create a SimplePkg from filepaths like
/var/cache/pacman/pkg/linux-3.2.14-1-x86_64.pkg.tar.zst
simplepkg' :: Text -> Maybe SimplePkg Source #
Attempt to create a SimplePkg from text like:
xchat 2.8.8-19
Typeclasses
class Flagable a where Source #
Types whose members can be converted to CLI flags.
Instances
| Flagable Text Source # | |
| Flagable PkgGroup Source # | |
| Flagable PkgName Source # | |
| Flagable ColourMode Source # | |
Defined in Aura.Settings Methods asFlag :: ColourMode -> [Text] Source # | |
| Flagable CommonSwitch Source # | |
Defined in Aura.Settings Methods asFlag :: CommonSwitch -> [Text] Source # | |
| Flagable CommonConfig Source # | |
Defined in Aura.Settings Methods asFlag :: CommonConfig -> [Text] Source # | |
| Flagable Makepkg Source # | |
| (Foldable f, Flagable a) => Flagable (f a) Source # | |
Defined in Aura.Types | |
Package Building
data VersionDemand Source #
The versioning requirement of some package's dependency.
Constructors
| LessThan !Versioning | |
| AtLeast !Versioning | |
| MoreThan !Versioning | |
| MustBe !Versioning | |
| Anything |
Instances
| Eq VersionDemand Source # | |
Defined in Aura.Types Methods (==) :: VersionDemand -> VersionDemand -> Bool # (/=) :: VersionDemand -> VersionDemand -> Bool # | |
| Ord VersionDemand Source # | |
Defined in Aura.Types Methods compare :: VersionDemand -> VersionDemand -> Ordering # (<) :: VersionDemand -> VersionDemand -> Bool # (<=) :: VersionDemand -> VersionDemand -> Bool # (>) :: VersionDemand -> VersionDemand -> Bool # (>=) :: VersionDemand -> VersionDemand -> Bool # max :: VersionDemand -> VersionDemand -> VersionDemand # min :: VersionDemand -> VersionDemand -> VersionDemand # | |
| Show VersionDemand Source # | |
Defined in Aura.Types Methods showsPrec :: Int -> VersionDemand -> ShowS # show :: VersionDemand -> String # showList :: [VersionDemand] -> ShowS # | |
_VersionDemand :: Traversal' VersionDemand Versioning Source #
Attempt to zoom into the Versioning hiding within a VersionDemand.
data InstallType Source #
The installation method.
Instances
| Eq InstallType Source # | |
Defined in Aura.Types | |
Errors
The various ways that dependency resolution can fail.
Constructors
| NonExistant !PkgName !PkgName | |
| VerConflict !(Doc AnsiStyle) | |
| Ignored !(Doc AnsiStyle) | |
| BrokenProvides !PkgName !Provides !PkgName |
Failures that can occur during Aura processing. Could be a message, or a silent failure that should print nothing to the console.
Instances
| Show Failure Source # | |
| Exception Failure Source # | |
Defined in Aura.Types Methods toException :: Failure -> SomeException # fromException :: SomeException -> Maybe Failure # displayException :: Failure -> String # | |
Some failure message that when given the current runtime Language
will produce a human-friendly error.
Instances
| Show FailMsg Source # | |
| Exception FailMsg Source # | |
Defined in Aura.Types Methods toException :: FailMsg -> SomeException # fromException :: SomeException -> Maybe FailMsg # displayException :: FailMsg -> String # | |
Language
All human languages available for text output.
Constructors
| English | |
| Japanese | |
| Polish | |
| Croatian | |
| Swedish | |
| German | |
| Spanish | |
| Portuguese | |
| French | |
| Russian | |
| Italian | |
| Serbian | |
| Norwegian | |
| Indonesia | |
| Chinese | |
| Esperanto | |
| Dutch | |
| Turkish | |
| Arabic | |
| Ukrainian | |
| Romanian | |
| Vietnamese | |
| Czech | |
| Korean |
Instances
| Bounded Language Source # | |
| Enum Language Source # | |
| Eq Language Source # | |
| Ord Language Source # | |
Defined in Aura.Types | |
| Show Language Source # | |
Other Wrappers
The name of an Arch Linux package.
Instances
| Eq PkgName Source # | |
| Ord PkgName Source # | |
| Show PkgName Source # | |
| IsString PkgName Source # | |
Defined in Aura.Types Methods fromString :: String -> PkgName # | |
| Generic PkgName Source # | |
| ToJSONKey PkgName Source # | |
Defined in Aura.Types | |
| FromJSONKey PkgName Source # | |
Defined in Aura.Types Methods | |
| Flagable PkgName Source # | |
| type Rep PkgName Source # | |
Defined in Aura.Types | |
A group that a Package could belong too, like base, base-devel, etc.
The dependency which some package provides. May not be the same name as the package itself (e.g. cronie provides cron).
data PackagePath Source #
Filepaths like:
- /var/cache/pacman/pkg/linux-3.2.14-1-x86_64.pkg.tar.xz
- /var/cache/pacman/pkg/wine-1.4rc6-1-x86_64.pkg.tar.xz
- /var/cache/pacman/pkg/ruby-1.9.3_p125-4-x86_64.pkg.tar.xz
Instances
| Eq PackagePath Source # | |
Defined in Aura.Types | |
| Ord PackagePath Source # | If they have the same package names, compare by their versions. Otherwise, do raw comparison of the path string. |
Defined in Aura.Types Methods compare :: PackagePath -> PackagePath -> Ordering # (<) :: PackagePath -> PackagePath -> Bool # (<=) :: PackagePath -> PackagePath -> Bool # (>) :: PackagePath -> PackagePath -> Bool # (>=) :: PackagePath -> PackagePath -> Bool # max :: PackagePath -> PackagePath -> PackagePath # min :: PackagePath -> PackagePath -> PackagePath # | |
| Generic PackagePath Source # | |
Defined in Aura.Types Associated Types type Rep PackagePath :: Type -> Type # | |
| type Rep PackagePath Source # | |
Defined in Aura.Types type Rep PackagePath = D1 ('MetaData "PackagePath" "Aura.Types" "aura-3.2.9-2s19zX6zRkNHYYiSz49mYF" 'True) (C1 ('MetaCons "PackagePath" 'PrefixI 'True) (S1 ('MetaSel ('Just "ppPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))) | |
packagePath :: FilePath -> Maybe PackagePath Source #
Smart constructor for PackagePath.
ppPath :: PackagePath -> FilePath Source #
The contents of a PKGBUILD file.
Constructors
| Pkgbuild | |
Fields | |
Instances
| Eq Pkgbuild Source # | |
| Ord Pkgbuild Source # | |
Defined in Aura.Types | |
| Show Pkgbuild Source # | |
| Generic Pkgbuild Source # | |
| type Rep Pkgbuild Source # | |
Defined in Aura.Types type Rep Pkgbuild = D1 ('MetaData "Pkgbuild" "Aura.Types" "aura-3.2.9-2s19zX6zRkNHYYiSz49mYF" 'True) (C1 ('MetaCons "Pkgbuild" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgbuild") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) | |