mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-11-27 18:45:57 +03:00
Add effect for adding file to store
This commit is contained in:
parent
972e2c706f
commit
cf214ad2c3
@ -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
|
||||
|
@ -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 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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user