2021-12-01 10:41:02 +01:00
|
|
|
{
|
|
|
|
description = "My Advent of Code solutions";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
futils = {
|
|
|
|
type = "github";
|
|
|
|
owner = "numtide";
|
|
|
|
repo = "flake-utils";
|
2023-12-01 20:24:35 +01:00
|
|
|
ref = "main";
|
2021-12-01 10:41:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
2022-12-01 10:02:37 +01:00
|
|
|
ref = "nixpkgs-unstable";
|
2021-12-01 10:41:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
pre-commit-hooks = {
|
|
|
|
type = "github";
|
|
|
|
owner = "cachix";
|
|
|
|
repo = "pre-commit-hooks.nix";
|
|
|
|
ref = "master";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
2022-12-01 10:01:42 +01:00
|
|
|
nixpkgs-stable.follows = "nixpkgs";
|
2021-12-01 10:41:02 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, futils, nixpkgs, pre-commit-hooks }:
|
|
|
|
futils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
checks = {
|
|
|
|
pre-commit = pre-commit-hooks.lib.${system}.run {
|
|
|
|
src = self;
|
|
|
|
|
|
|
|
hooks = {
|
2024-11-23 19:45:57 +01:00
|
|
|
nixpkgs-fmt = {
|
2021-12-01 10:41:02 +01:00
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-11-23 19:45:57 +01:00
|
|
|
ruff-format = {
|
2021-12-01 10:41:02 +01:00
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2021-12-25 00:30:39 +01:00
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
mypy
|
2021-12-25 00:30:52 +01:00
|
|
|
z3
|
2021-12-25 00:30:39 +01:00
|
|
|
]))
|
2022-12-01 09:58:01 +01:00
|
|
|
pyright
|
2024-11-23 19:45:57 +01:00
|
|
|
ruff
|
2021-12-01 10:41:02 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
inherit (self.checks.${system}.pre-commit) shellHook;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|