kesha-0.1.0.1: Haskell implementation of nix-hash

Copyright(c) 2020 Jordan Mackie
LicenseMIT
MaintainerJordan Mackie <contact@jmackie.dev>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Kesha.NAR

Description

An implementation of the Nix ARchive format (NAR).

Synopsis

Documentation

data NAR Source #

A packed NAR archive.

data PackError Source #

Errors that can be raised when attempting to pack a path into a NAR archive.

Constructors

FileDoesNotExist FilePath

Attempted to pack a path that doesn't exist.

AmbiguousFileType FilePath

Heuristic for detecting the type of path failed. Where type is one: a regular file, a directory, or a symbolic link.

Instances
Eq PackError Source # 
Instance details

Defined in Kesha.NAR

Show PackError Source # 
Instance details

Defined in Kesha.NAR

localPack :: FilePath -> IO (Either PackError NAR) Source #

Create a NAR archive for the given path in a local context.

See figure 5.2 of https://nixos.org/~eelco/pubs/phd-thesis.pdf

dump :: NAR -> ByteString Source #

Serialize a NAR archive.