Home Explore Blog CI



nix

1st chunk of `src/nix/nar-dump-path.md`
dd48eb0c3f53a9de5b93f361754cc82ef6f810477aeade460000000100000178
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
Summary
The `nix nar pack` command creates a Nix Archive (NAR) file from a given path, which can contain regular files, directories, and symbolic links. The resulting NAR file is written to standard output. An example usage is provided, demonstrating how to serialize a directory named 'foo' into a NAR file named 'foo.nar'.