Skip to main content

push_path

Function push_path 

Source
pub async fn push_path(
    storage: &dyn StorageBackend,
    signer: &CacheSigner,
    store_path: &str,
    hash: &str,
    references: &[String],
    deriver: Option<&str>,
) -> Result<PushResult, CacheError>
Expand description

Push a store path to the binary cache.

  1. Dump the path as NAR
  2. Hash the uncompressed NAR (sha256)
  3. Compress with xz
  4. Hash the compressed NAR (sha256)
  5. Build narinfo metadata
  6. Sign the narinfo
  7. Upload NAR blob and narinfo

The store_path should be an absolute path like /nix/store/abc-hello-1.0. The hash is the 32-character store path hash (the abc part).

references are the runtime dependency store path basenames.