aoc/2024/02/flake.nix

32 lines
819 B
Nix
Raw Permalink Normal View History

2024-12-02 14:49:50 +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";};
solution = import ./solution.nix pkgs;
in {
part1example = (solution {file = ./example.txt;}).part1result;
part1 = (solution {file = ./input.txt;}).part1result;
part2example = (solution {file = ./example.txt;}).part2result;
part2 = (solution {file = ./input.txt;}).part2result;
packages.x86_64-linux.watch = tix.watch {
cmd = ''
nix run .\#test --impure --extra-experimental-features pipe-operators
'';
};
packages.x86_64-linux.test = tix.run [
./solution.test.nix
];
};
}