Home Explore Blog Models CI



nix

src/nix/nar-dump-path.md
5c93cf5ec376b6727bb3a5e41bdf6eb2e194e27b57de97da00000003000001d0
R""(

# Examples

* To serialise directory `foo` as a [Nix Archive (NAR)][Nix Archive]:

  ```console
  # nix nar pack ./foo > foo.nar
  ```

# Description

This command generates a [Nix Archive (NAR)][Nix Archive] file containing the serialisation of
*path*, which must contain only regular files, directories and
symbolic links. The NAR is written to standard output.


)""

Chunks
7e4ba697 (1st chunk of `src/nix/nar-dump-path.md`)
Title: `nix nar pack` Command Description
Summary
The `nix nar pack` command serializes a specified directory or path into a Nix Archive (NAR) file, writing the output to standard output. The input path must exclusively contain regular files, directories, and symbolic links. An example demonstrates how to pack a directory named `foo` into a `foo.nar` file.