advent-of-code/flake.nix
2023-12-06 23:31:00 -08:00

47 lines
1 KiB
Nix

{
description = "Advent of Code";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
}: let
inherit (nixpkgs) lib;
genSystems = lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
pkgsFor = system: import nixpkgs {inherit system;};
in {
devShells = genSystems (
system: let
pkgs = pkgsFor system;
in {
default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.clang-tools
(pkgs.sbcl.withPackages (p:
with p; [
alexandria
cl-ppcre
split-sequence
]))
(pkgs.ghc.withPackages (p:
with p; [
containers
regex-compat
split
unordered-containers
vector
]))
];
CXXFLAGS = "-std=c++20 -Wall";
};
}
);
formatter = genSystems (system: (pkgsFor system).alejandra);
};
}