Merge branch 'addFile' of git://github.com/rpglover64/hnix-store

This commit is contained in:
Shea Levy 2018-04-29 15:34:03 -07:00
commit da0f19a65f
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,6 @@ library
-- Drop foundation when we can drop cryptonite <0.25
cryptonite, memory, foundation, basement,
text, regex-base, regex-tdfa-text,
hashable, unordered-containers
hashable, unordered-containers, bytestring
hs-source-dirs: src
default-language: Haskell2010

View File

@ -14,6 +14,7 @@ module System.Nix.Store
import Crypto.Hash (Digest)
import Crypto.Hash.Truncated (Truncated)
import Crypto.Hash.Algorithms (SHA256)
import qualified Data.ByteString.Lazy as BS
import qualified Data.ByteArray as B
import Data.Text (Text)
import Text.Regex.Base.RegexLike (makeRegex, matchTest)
@ -109,4 +110,6 @@ data StoreEffects rootedPath validPath m =
derivationOutputNames :: !(validPath -> m (HashSet Text))
, -- | Get a full 'Path' corresponding to a given 'Digest'.
pathFromHashPart :: !(Digest PathHashAlgo -> m Path)
, -- | Add a non-nar file to the store
addFile :: !(BS.ByteString -> m validPath)
}