hnix-store-core-0.1.0.0: Core effects for interacting with the Nix store.

MaintainerShea Levy <shea@shealevy.com>
Safe HaskellNone
LanguageHaskell2010

System.Nix.Path

Description

 
Synopsis

Documentation

type PathHashAlgo = Truncated 20 SHA256 Source #

The hash algorithm used for store path hashes.

data Path Source #

A path in a store.

Constructors

Path !(Digest PathHashAlgo) !PathName 
Instances
Eq Path Source # 
Instance details

Defined in System.Nix.Path

Methods

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

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

Ord Path Source # 
Instance details

Defined in System.Nix.Path

Methods

compare :: Path -> Path -> Ordering #

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

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

(>) :: Path -> Path -> Bool #

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

max :: Path -> Path -> Path #

min :: Path -> Path -> Path #

Show Path Source # 
Instance details

Defined in System.Nix.Path

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

Hashable Path Source # 
Instance details

Defined in System.Nix.Path

Methods

hashWithSalt :: Int -> Path -> Int #

hash :: Path -> Int #

data ValidPathInfo Source #

Information about Path

Constructors

ValidPathInfo 

Fields

  • path :: !Path

    Path itself

  • deriverVP :: !(Maybe Path)

    The .drv which led to this Path.

  • narHash :: !Text

    NAR hash

  • referencesVP :: !PathSet

    The references of the Path

  • registrationTime :: !Integer

    Registration time should be time_t

  • narSizeVP :: !Integer

    The size of the uncompressed NAR serialization of this Path.

  • ultimate :: !Bool

    Whether the path is ultimately trusted, that is, it's a derivation output that was built locally.

  • sigs :: ![Text]

    Signatures

  • ca :: !Text

    Content-addressed Store path is computed from a cryptographic hash of the contents of the path, plus some other bits of data like the "name" part of the path.

    ‘ca’ has one of the following forms: * ‘text:sha256:hash of file contents’ (paths by makeTextPath() / addTextToStore()) * ‘fixed:r?:ht:h’ (paths by makeFixedOutputPath() / addToStore())

newtype PathName Source #

The name portion of a Nix path.

Must be composed of a-z, A-Z, 0-9, +, -, ., _, ?, and =, can't start with a ., and must have at least one character.

Constructors

PathName 

Fields

Instances
Eq PathName Source # 
Instance details

Defined in System.Nix.Path

Ord PathName Source # 
Instance details

Defined in System.Nix.Path

Show PathName Source # 
Instance details

Defined in System.Nix.Path

Hashable PathName Source # 
Instance details

Defined in System.Nix.Path

Methods

hashWithSalt :: Int -> PathName -> Int #

hash :: PathName -> Int #

filePathPart :: ByteString -> Maybe FilePathPart Source #

Construct FilePathPart from Text by checking that there are no / or '\\NUL' characters

pathName :: Text -> Maybe PathName Source #

Construct a PathName, assuming the provided contents are valid.