hnix-store/hnix-store-remote
2023-12-08 12:41:08 +01:00
..
app remote: add build-derivation executable 2023-11-30 06:59:59 +01:00
src core,json: wrap (DerivationOutput OutputName, Realisation) tuple into newtype 2023-12-08 12:41:08 +01:00
tests remote: delete obsolete serialization prims and instances 2023-12-07 16:35:16 +01:00
tests-io remote: tests-io cleanup 2023-12-07 17:57:45 +01:00
CHANGELOG.md remote: CHANGELOG cleanup 2023-11-15 08:49:38 +01:00
hnix-store-remote.cabal wip/remote: add daemon runners, simplify server using StoreReply 2023-12-08 12:18:10 +01:00
LICENSE hnix-store-remote prototype 2018-07-16 09:12:23 +02:00
README.lhs remote: build README.md via cabal 2023-11-14 09:45:29 +01:00
README.md remote: port all operations to GADT based ones 2023-12-07 16:35:16 +01:00

hnix-store-remote

Nix worker protocol implementation for interacting with remote Nix store via nix-daemon.

API

Example

{-# LANGUAGE OverloadedStrings #-}

import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import System.Nix.StorePath (mkStorePathName)
import System.Nix.Store.Remote

main :: IO ()
main = do
  void $ runStore $ do
    syncWithGC
    roots <- findRoots
    liftIO $ print roots

    res <- case mkStorePathName "hnix-store" of
      Left e -> error (show e)
      Right name ->
        addTextToStore
         (StoreText name "Hello World!")
         mempty
         RepairMode_DontRepair
    liftIO $ print res