Skip to content

Commit da0f19a

Browse files
committed
Merge branch 'addFile' of git://github.com/rpglover64/hnix-store
2 parents e750f60 + 2cde70f commit da0f19a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hnix-store-core/hnix-store-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ library
2222
-- Drop foundation when we can drop cryptonite <0.25
2323
cryptonite, memory, foundation, basement,
2424
text, regex-base, regex-tdfa-text,
25-
hashable, unordered-containers
25+
hashable, unordered-containers, bytestring
2626
hs-source-dirs: src
2727
default-language: Haskell2010

hnix-store-core/src/System/Nix/Store.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module System.Nix.Store
1414
import Crypto.Hash (Digest)
1515
import Crypto.Hash.Truncated (Truncated)
1616
import Crypto.Hash.Algorithms (SHA256)
17+
import qualified Data.ByteString.Lazy as BS
1718
import qualified Data.ByteArray as B
1819
import Data.Text (Text)
1920
import Text.Regex.Base.RegexLike (makeRegex, matchTest)
@@ -109,4 +110,6 @@ data StoreEffects rootedPath validPath m =
109110
derivationOutputNames :: !(validPath -> m (HashSet Text))
110111
, -- | Get a full 'Path' corresponding to a given 'Digest'.
111112
pathFromHashPart :: !(Digest PathHashAlgo -> m Path)
113+
, -- | Add a non-nar file to the store
114+
addFile :: !(BS.ByteString -> m validPath)
112115
}

0 commit comments

Comments
 (0)