hnix-store/hnix-store-remote
squalus d3408a60b4 remote: add SuccessCodeReply
Add SuccessCodeReply to replace instances of the () reply type.

The serialization behavior is more clear with the more explicit type.
2023-12-12 14:58:39 -08:00
..
app remote: simplify buildDerivation 2023-12-08 13:26:49 +01:00
src remote: add SuccessCodeReply 2023-12-12 14:58:39 -08:00
tests remote: TestStoreConfig no longer needed 2023-12-10 17:11:16 +01:00
tests-io remote: fix flaky collectGarbage for MITM test 2023-12-12 07:09:17 +01:00
CHANGELOG.md remote: CHANGELOG cleanup 2023-11-15 08:49:38 +01:00
hnix-store-remote.cabal remote: add SuccessCodeReply 2023-12-12 14:58:39 -08: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: neaten readme 2023-12-09 17:05:32 +01:00

hnix-store-remote

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

API

Example

{-# LANGUAGE OverloadedStrings #-}

import System.Nix.StorePath (mkStorePathName)
import System.Nix.Store.Remote

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

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

    pure (roots, res)
  >>= print