Skip to content

Commit

Permalink
Update packaging section in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Dec 8, 2023
1 parent ab379b4 commit 6d18ee8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ My solutions to the [Advent of Code 2023](https://adventofcode.com/2023), writte

## Packaging

The programs are packaged with Nix, making it easy for CI to run a single workflow over all days regardless of the compiler/language used.
The programs are packaged with [Nix](https://nixos.org/), a functional package manager for Linux and macOS that focuses on reproducible builds. This makes it easy to build the programs, both locally and CI, without relying on system packages.

To build one of the days, `cd` into the corresponding directory, `nix-build` the package and run it from the symlinked directory. For example, to build and execute day 4, run:

```sh
cd day04
nix-build && result/bin/day04 resources/input.txt
```

Every day is packaged up to take exactly one command-line argument, the input file, and usually includes the demo input from the exercise too.

## Previous years

Expand Down

0 comments on commit 6d18ee8

Please sign in to comment.