hnix-store/hnix-store-remote/README.md

31 lines
574 B
Markdown
Raw Normal View History

2020-12-30 16:46:13 +03:00
# hnix-store-remote
2018-07-16 10:12:23 +03:00
2020-12-30 16:46:13 +03:00
[Nix] worker protocol implementation for interacting with remote Nix store
2018-07-16 10:12:23 +03:00
via `nix-daemon`.
2020-12-30 16:46:13 +03:00
[Nix]: https://nixos.org/nix
2018-07-16 10:12:23 +03:00
## API
[System.Nix.Store.Remote]: ./src/System/Nix/Store/Remote.hs
## Example
```haskell
{-# LANGUAGE OverloadedStrings #-}
2018-07-16 10:12:23 +03:00
import Control.Monad (void)
2019-03-28 23:32:31 +03:00
import Control.Monad.IO.Class (liftIO)
2018-07-16 10:12:23 +03:00
import System.Nix.Store.Remote
main :: IO ()
2018-07-16 10:12:23 +03:00
main = do
void $ runStore $ do
2018-07-16 10:12:23 +03:00
syncWithGC
roots <- findRoots
liftIO $ print roots
res <- addTextToStore "hnix-store" "test" mempty dontRepair
2019-03-28 23:32:31 +03:00
liftIO $ print res
2018-07-16 10:12:23 +03:00
```