aura-3.2.2: A secure package manager for Arch Linux and the AUR.
Copyright(c) Colin Woodbury 2012 - 2020
LicenseGPL3
MaintainerColin Woodbury <colin@fosskers.ca>
Safe HaskellNone
LanguageHaskell2010

Aura.Types

Description

Core Aura types.

Synopsis

Package Types

data Package Source #

A package to be installed.

Instances

Instances details
Eq Package Source # 
Instance details

Defined in Aura.Types

Methods

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

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

Ord Package Source # 
Instance details

Defined in Aura.Types

pname :: Package -> PkgName Source #

The name of a Package.

pprov :: Package -> Provides Source #

Other names which allow this Package to be satisfied as a dependency.

pver :: Package -> Versioning Source #

The version of a Package.

data Dep Source #

A dependency on another package.

Constructors

Dep 

Instances

Instances details
Eq Dep Source # 
Instance details

Defined in Aura.Types

Methods

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

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

Ord Dep Source # 
Instance details

Defined in Aura.Types

Methods

compare :: Dep -> Dep -> Ordering #

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

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

(>) :: Dep -> Dep -> Bool #

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

max :: Dep -> Dep -> Dep #

min :: Dep -> Dep -> Dep #

Show Dep Source # 
Instance details

Defined in Aura.Types

Methods

showsPrec :: Int -> Dep -> ShowS #

show :: Dep -> String #

showList :: [Dep] -> ShowS #

Generic Dep Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep Dep :: Type -> Type #

Methods

from :: Dep -> Rep Dep x #

to :: Rep Dep x -> Dep #

type Rep Dep Source # 
Instance details

Defined in Aura.Types

type Rep Dep = D1 ('MetaData "Dep" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" '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 #

Renders the Dep into a form that pacman -T understands. The dual of parseDep.

data Buildable Source #

A Package from the AUR that's buildable in some way on the user's machine.

Instances

Instances details
Eq Buildable Source # 
Instance details

Defined in Aura.Types

Ord Buildable Source # 
Instance details

Defined in Aura.Types

Show Buildable Source # 
Instance details

Defined in Aura.Types

Generic Buildable Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep Buildable :: Type -> Type #

type Rep Buildable Source # 
Instance details

Defined in Aura.Types

data Prebuilt Source #

A prebuilt Package from the official Arch repositories.

Constructors

Prebuilt 

Instances

Instances details
Eq Prebuilt Source # 
Instance details

Defined in Aura.Types

Ord Prebuilt Source # 
Instance details

Defined in Aura.Types

Show Prebuilt Source # 
Instance details

Defined in Aura.Types

Generic Prebuilt Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep Prebuilt :: Type -> Type #

Methods

from :: Prebuilt -> Rep Prebuilt x #

to :: Rep Prebuilt x -> Prebuilt #

type Rep Prebuilt Source # 
Instance details

Defined in Aura.Types

data SimplePkg Source #

A package name with its version number.

Constructors

SimplePkg 

Instances

Instances details
Eq SimplePkg Source # 
Instance details

Defined in Aura.Types

Ord SimplePkg Source # 
Instance details

Defined in Aura.Types

Show SimplePkg Source # 
Instance details

Defined in Aura.Types

Generic SimplePkg Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep SimplePkg :: Type -> Type #

type Rep SimplePkg Source # 
Instance details

Defined in Aura.Types

type Rep SimplePkg = D1 ('MetaData "SimplePkg" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" '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.xz

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.

Methods

asFlag :: a -> [Text] Source #

Instances

Instances details
Flagable Text Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: Text -> [Text] Source #

Flagable PkgGroup Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: PkgGroup -> [Text] Source #

Flagable PkgName Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: PkgName -> [Text] Source #

Flagable ColourMode Source # 
Instance details

Defined in Aura.Settings

Methods

asFlag :: ColourMode -> [Text] Source #

Flagable CommonSwitch Source # 
Instance details

Defined in Aura.Settings

Flagable CommonConfig Source # 
Instance details

Defined in Aura.Settings

Flagable Makepkg Source # 
Instance details

Defined in Aura.Settings

Methods

asFlag :: Makepkg -> [Text] Source #

(Foldable f, Flagable a) => Flagable (f a) Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: f a -> [Text] Source #

Package Building

data InstallType Source #

The installation method.

Constructors

Pacman !PkgName 
Build !Buildable 

Instances

Instances details
Eq InstallType Source # 
Instance details

Defined in Aura.Types

Errors

data DepError Source #

The various ways that dependency resolution can fail.

data Failure Source #

Failures that can occur during Aura processing. Could be a message, or a silent failure that should print nothing to the console.

Constructors

Silent 
Failure FailMsg 

Instances

Instances details
Show Failure Source # 
Instance details

Defined in Aura.Types

Exception Failure Source # 
Instance details

Defined in Aura.Types

newtype FailMsg Source #

Some failure message that when given the current runtime Language will produce a human-friendly error.

Constructors

FailMsg 

Instances

Instances details
Show FailMsg Source # 
Instance details

Defined in Aura.Types

Exception FailMsg Source # 
Instance details

Defined in Aura.Types

Language

data Language Source #

All human languages available for text output.

Instances

Instances details
Bounded Language Source # 
Instance details

Defined in Aura.Types

Enum Language Source # 
Instance details

Defined in Aura.Types

Eq Language Source # 
Instance details

Defined in Aura.Types

Ord Language Source # 
Instance details

Defined in Aura.Types

Show Language Source # 
Instance details

Defined in Aura.Types

Other Wrappers

newtype PkgName Source #

The name of an Arch Linux package.

Constructors

PkgName 

Fields

Instances

Instances details
Eq PkgName Source # 
Instance details

Defined in Aura.Types

Methods

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

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

Ord PkgName Source # 
Instance details

Defined in Aura.Types

Show PkgName Source # 
Instance details

Defined in Aura.Types

IsString PkgName Source # 
Instance details

Defined in Aura.Types

Methods

fromString :: String -> PkgName #

Generic PkgName Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

ToJSONKey PkgName Source # 
Instance details

Defined in Aura.Types

FromJSONKey PkgName Source # 
Instance details

Defined in Aura.Types

Flagable PkgName Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: PkgName -> [Text] Source #

type Rep PkgName Source # 
Instance details

Defined in Aura.Types

type Rep PkgName = D1 ('MetaData "PkgName" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "PkgName" 'PrefixI 'True) (S1 ('MetaSel ('Just "pnName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype PkgGroup Source #

A group that a Package could belong too, like base, base-devel, etc.

Constructors

PkgGroup 

Fields

Instances

Instances details
Eq PkgGroup Source # 
Instance details

Defined in Aura.Types

Ord PkgGroup Source # 
Instance details

Defined in Aura.Types

Show PkgGroup Source # 
Instance details

Defined in Aura.Types

Generic PkgGroup Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep PkgGroup :: Type -> Type #

Methods

from :: PkgGroup -> Rep PkgGroup x #

to :: Rep PkgGroup x -> PkgGroup #

Flagable PkgGroup Source # 
Instance details

Defined in Aura.Types

Methods

asFlag :: PkgGroup -> [Text] Source #

type Rep PkgGroup Source # 
Instance details

Defined in Aura.Types

type Rep PkgGroup = D1 ('MetaData "PkgGroup" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "PkgGroup" 'PrefixI 'True) (S1 ('MetaSel ('Just "pgGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype Provides Source #

The dependency which some package provides. May not be the same name as the package itself (e.g. cronie provides cron).

Constructors

Provides 

Fields

Instances

Instances details
Eq Provides Source # 
Instance details

Defined in Aura.Types

Ord Provides Source # 
Instance details

Defined in Aura.Types

Show Provides Source # 
Instance details

Defined in Aura.Types

Generic Provides Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep Provides :: Type -> Type #

Methods

from :: Provides -> Rep Provides x #

to :: Rep Provides x -> Provides #

type Rep Provides Source # 
Instance details

Defined in Aura.Types

type Rep Provides = D1 ('MetaData "Provides" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "Provides" 'PrefixI 'True) (S1 ('MetaSel ('Just "provides") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PkgName)))

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

Instances details
Eq PackagePath Source # 
Instance details

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.

Instance details

Defined in Aura.Types

Generic PackagePath Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep PackagePath :: Type -> Type #

type Rep PackagePath Source # 
Instance details

Defined in Aura.Types

type Rep PackagePath = D1 ('MetaData "PackagePath" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "PackagePath" 'PrefixI 'True) (S1 ('MetaSel ('Just "ppPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

newtype Pkgbuild Source #

The contents of a PKGBUILD file.

Constructors

Pkgbuild 

Fields

Instances

Instances details
Eq Pkgbuild Source # 
Instance details

Defined in Aura.Types

Ord Pkgbuild Source # 
Instance details

Defined in Aura.Types

Show Pkgbuild Source # 
Instance details

Defined in Aura.Types

Generic Pkgbuild Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep Pkgbuild :: Type -> Type #

Methods

from :: Pkgbuild -> Rep Pkgbuild x #

to :: Rep Pkgbuild x -> Pkgbuild #

type Rep Pkgbuild Source # 
Instance details

Defined in Aura.Types

type Rep Pkgbuild = D1 ('MetaData "Pkgbuild" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "Pkgbuild" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkgbuild") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

type Environment = Map Text Text Source #

Shell environment variables.

newtype User Source #

The name of a user account on a Linux system.

Constructors

User 

Fields

Instances

Instances details
Eq User Source # 
Instance details

Defined in Aura.Types

Methods

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

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

Show User Source # 
Instance details

Defined in Aura.Types

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Generic User Source # 
Instance details

Defined in Aura.Types

Associated Types

type Rep User :: Type -> Type #

Methods

from :: User -> Rep User x #

to :: Rep User x -> User #

type Rep User Source # 
Instance details

Defined in Aura.Types

type Rep User = D1 ('MetaData "User" "Aura.Types" "aura-3.2.2-EfDvW15jsYHDvKMjiTfN8s" 'True) (C1 ('MetaCons "User" 'PrefixI 'True) (S1 ('MetaSel ('Just "user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))