2024-12-06 07:13:59 +00:00
|
|
|
{
|
|
|
|
description = "A very basic flake";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
|
|
tix.url = "git+https://git.tristans.cloud/tristan/tix";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, tix }: let
|
|
|
|
pkgs = import nixpkgs {system = "x86_64-linux";};
|
|
|
|
in {
|
|
|
|
|
|
|
|
day06 = let
|
|
|
|
solution = import ./06/solution.nix pkgs;
|
|
|
|
example = (pkgs.lib.readFile ./06/example.txt);
|
|
|
|
input = (pkgs.lib.readFile ./06/input.txt);
|
|
|
|
in {
|
2024-12-06 15:12:28 +00:00
|
|
|
example = (solution example);
|
|
|
|
sample1 = (solution ''
|
2024-12-07 17:56:20 +00:00
|
|
|
.#.
|
|
|
|
..#
|
|
|
|
#^.
|
|
|
|
.#.'');
|
2024-12-06 15:12:28 +00:00
|
|
|
sample2 = (solution ''
|
2024-12-07 17:56:20 +00:00
|
|
|
.#....
|
|
|
|
......
|
|
|
|
.....#
|
|
|
|
#.....
|
|
|
|
..#.#.
|
|
|
|
...^..'');
|
2024-12-06 15:12:28 +00:00
|
|
|
real = (solution input);
|
2024-12-06 07:13:59 +00:00
|
|
|
};
|
|
|
|
|
2024-12-07 17:56:20 +00:00
|
|
|
day07 = let
|
|
|
|
solution = import ./07/solution.nix pkgs;
|
|
|
|
example = (pkgs.lib.readFile ./07/example.txt);
|
|
|
|
input = (pkgs.lib.readFile ./07/input.txt);
|
|
|
|
in {
|
|
|
|
example = (solution example);
|
|
|
|
real = (solution input);
|
|
|
|
test = tix.run [
|
|
|
|
./07/solution.test.nix
|
|
|
|
];
|
2024-12-06 07:13:59 +00:00
|
|
|
};
|
|
|
|
|
2024-12-08 13:08:57 +00:00
|
|
|
day08 = let
|
|
|
|
solution = import ./08/solution.nix pkgs;
|
|
|
|
example = (pkgs.lib.readFile ./08/example);
|
|
|
|
input = (pkgs.lib.readFile ./08/input);
|
|
|
|
in {
|
|
|
|
solution = solution;
|
|
|
|
part1result = solution.part1result input;
|
|
|
|
test = tix.run [
|
|
|
|
./08/solution.test.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-12-06 07:13:59 +00:00
|
|
|
};
|
|
|
|
}
|