Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ThunkSource
- = ThunkSource_GitHub GitHubSource
- | ThunkSource_Git GitSource
- data GitHubSource = GitHubSource {}
- data ThunkRev = ThunkRev {
- _thunkRev_commit :: Ref SHA1
- _thunkRev_nixSha256 :: NixSha256
- getLatestRev :: MonadNixThunk m => ThunkSource -> m ThunkRev
- gitCloneForThunkUnpack :: MonadNixThunk m => GitSource -> Ref hash -> FilePath -> m ()
- thunkSourceToGitSource :: ThunkSource -> GitSource
- data ThunkPtr = ThunkPtr {}
- data ThunkData
- readThunk :: MonadNixThunk m => FilePath -> m (Either ReadThunkError ThunkData)
- data CheckClean
- getThunkPtr :: forall m. MonadNixThunk m => CheckClean -> FilePath -> Maybe Bool -> m ThunkPtr
- packThunk :: MonadNixThunk m => ThunkPackConfig -> FilePath -> m ThunkPtr
- createThunk :: MonadNixThunk m => FilePath -> Either ThunkSpec ThunkPtr -> m ()
- data ThunkPackConfig = ThunkPackConfig {}
- newtype ThunkConfig = ThunkConfig {}
- updateThunkToLatest :: MonadNixThunk m => ThunkUpdateConfig -> FilePath -> m ()
- data ThunkUpdateConfig = ThunkUpdateConfig {}
- unpackThunk :: MonadNixThunk m => FilePath -> m ()
- data ThunkSpec = ThunkSpec {}
- data ThunkFileSpec
- data NixThunkError
- nixBuildAttrWithCache :: (MonadLog Output m, HasCliConfig m, MonadIO m, MonadMask m, MonadError NixThunkError m, MonadFail m) => FilePath -> String -> m FilePath
- attrCacheFileName :: FilePath
- prettyNixThunkError :: NixThunkError -> Text
Documentation
data ThunkSource Source #
A location from which a thunk's data can be retrieved
ThunkSource_GitHub GitHubSource | A source specialized for GitHub |
ThunkSource_Git GitSource | A plain repo source |
Instances
Eq ThunkSource Source # | |
Defined in Nix.Thunk (==) :: ThunkSource -> ThunkSource -> Bool # (/=) :: ThunkSource -> ThunkSource -> Bool # | |
Ord ThunkSource Source # | |
Defined in Nix.Thunk compare :: ThunkSource -> ThunkSource -> Ordering # (<) :: ThunkSource -> ThunkSource -> Bool # (<=) :: ThunkSource -> ThunkSource -> Bool # (>) :: ThunkSource -> ThunkSource -> Bool # (>=) :: ThunkSource -> ThunkSource -> Bool # max :: ThunkSource -> ThunkSource -> ThunkSource # min :: ThunkSource -> ThunkSource -> ThunkSource # | |
Show ThunkSource Source # | |
Defined in Nix.Thunk showsPrec :: Int -> ThunkSource -> ShowS # show :: ThunkSource -> String # showList :: [ThunkSource] -> ShowS # |
data GitHubSource Source #
Instances
Eq GitHubSource Source # | |
Defined in Nix.Thunk (==) :: GitHubSource -> GitHubSource -> Bool # (/=) :: GitHubSource -> GitHubSource -> Bool # | |
Ord GitHubSource Source # | |
Defined in Nix.Thunk compare :: GitHubSource -> GitHubSource -> Ordering # (<) :: GitHubSource -> GitHubSource -> Bool # (<=) :: GitHubSource -> GitHubSource -> Bool # (>) :: GitHubSource -> GitHubSource -> Bool # (>=) :: GitHubSource -> GitHubSource -> Bool # max :: GitHubSource -> GitHubSource -> GitHubSource # min :: GitHubSource -> GitHubSource -> GitHubSource # | |
Show GitHubSource Source # | |
Defined in Nix.Thunk showsPrec :: Int -> GitHubSource -> ShowS # show :: GitHubSource -> String # showList :: [GitHubSource] -> ShowS # |
A specific revision of data; it may be available from multiple sources
ThunkRev | |
|
getLatestRev :: MonadNixThunk m => ThunkSource -> m ThunkRev Source #
Get the latest revision available from the given source
thunkSourceToGitSource :: ThunkSource -> GitSource Source #
A reference to the exact data that a thunk should translate into
ThunkData_Packed ThunkSpec ThunkPtr | Packed thunk |
ThunkData_Checkout | Checked out thunk that was unpacked from this pointer |
readThunk :: MonadNixThunk m => FilePath -> m (Either ReadThunkError ThunkData) Source #
Read a thunk and validate that it is exactly a packed thunk. If additional data is present, fail.
data CheckClean Source #
CheckClean_FullCheck | Check that the repo is clean, including .gitignored files |
CheckClean_NotIgnored | Check that the repo is clean, not including .gitignored files |
CheckClean_NoCheck | Don't check that the repo is clean |
getThunkPtr :: forall m. MonadNixThunk m => CheckClean -> FilePath -> Maybe Bool -> m ThunkPtr Source #
data ThunkPackConfig Source #
Instances
Show ThunkPackConfig Source # | |
Defined in Nix.Thunk showsPrec :: Int -> ThunkPackConfig -> ShowS # show :: ThunkPackConfig -> String # showList :: [ThunkPackConfig] -> ShowS # |
newtype ThunkConfig Source #
Instances
Show ThunkConfig Source # | |
Defined in Nix.Thunk showsPrec :: Int -> ThunkConfig -> ShowS # show :: ThunkConfig -> String # showList :: [ThunkConfig] -> ShowS # |
updateThunkToLatest :: MonadNixThunk m => ThunkUpdateConfig -> FilePath -> m () Source #
data ThunkUpdateConfig Source #
Instances
Show ThunkUpdateConfig Source # | |
Defined in Nix.Thunk showsPrec :: Int -> ThunkUpdateConfig -> ShowS # show :: ThunkUpdateConfig -> String # showList :: [ThunkUpdateConfig] -> ShowS # |
unpackThunk :: MonadNixThunk m => FilePath -> m () Source #
Specification for how a set of files in a thunk version work.
data ThunkFileSpec Source #
Specification for how a file in a thunk version works.
ThunkFileSpec_Ptr (ByteString -> Either String ThunkPtr) | This file specifies |
ThunkFileSpec_FileMatches Text | This file must match the given content exactly |
ThunkFileSpec_CheckoutIndicator | Existence of this directory indicates that the thunk is unpacked |
ThunkFileSpec_AttrCache | This directory is an attribute cache |
data NixThunkError Source #
Instances
AsProcessFailure NixThunkError Source # | |
Defined in Nix.Thunk | |
AsUnstructuredError NixThunkError Source # | |
Defined in Nix.Thunk |
nixBuildAttrWithCache Source #
:: (MonadLog Output m, HasCliConfig m, MonadIO m, MonadMask m, MonadError NixThunkError m, MonadFail m) | |
=> FilePath | Path to directory containing Thunk |
-> String | Attribute to build |
-> m FilePath | Symlink to cached or built nix output |
Build a nix attribute, and cache the result if possible