Skip to content

Commit

Permalink
Regenerate README
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Dec 15, 2023
1 parent 7d43d75 commit a3f19d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@ My solutions to the [Advent of Code 2023](https://adventofcode.com/2023), writte
- [x] Day 09: [Curry](day09/src/Day09.curry)
- [x] Day 10: [Java](day10/src/Day10.java)
- [x] Day 11: [Crystal](day11/src/day11.cr)
- [ ] Day 12: [MoonScript](day12/src/day12.moon)
- [x] Day 12: [MoonScript](day12/src/day12.moon)

## Packaging

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 and `nix build` the flake. To run it, use `nix run . <path to input>`. For example:
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 run . resources/input.txt
nix-build && result/bin/day04 resources/input.txt
```

> [!NOTE]
> Nix will automatically create a symlink pointing to the built derivation in the Nix store, from where the binaries can also be executed manually.
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
3 changes: 2 additions & 1 deletion paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"codemirror": "coffeescript",
"name": "MoonScript"
},
"path": "day12/src/day12.moon"
"path": "day12/src/day12.moon",
"completed": true
}
]

0 comments on commit a3f19d5

Please sign in to comment.