Home Explore Blog Models CI



nix

1st chunk of `src/nix/nar-dump-path.md`
7e4ba697428f9b1d250fcb02c65b737f18e42d6b676de52f0000000100000178
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.


)""

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.