About

Metadata

  • Last updated , by srk
  • License Apache-2.0
  • Categories Systems Programming
  • Maintained by: srk@48.io

  • Lottery factor: 2

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    io-testsuite (off by default)

    Enable testsuite, which requires external binaries and Linux namespace support.

    build-derivation (off by default)

    Build build-derivation executable

    build-readme (off by default)

    Build README.lhs example

Readme

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