advent-of-code/flake.nix
2023-12-10 20:14:59 -08:00

52 lines
1.1 KiB
Nix

{
description = "It's Adventing Time";
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
iterate
split-sequence
str
]))
(pkgs.ghc.withPackages (p:
with p; [
containers
extra
regex-compat
split
text
text-icu
unordered-containers
vector
]))
];
CXXFLAGS = "-std=c++20 -Wall";
};
}
);
formatter = genSystems (system: (pkgsFor system).alejandra);
};
}