Home Explore Blog 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
dd48eb0c (1st chunk of `src/nix/nar-dump-path.md`)
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'.