advent-of-code/flake.nix
2024-12-03 23:19:47 -08:00

54 lines
1.2 KiB
Nix

{
description = "It's Adventing Time";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
}: let
inherit (nixpkgs) lib;
forSystems = f:
lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
] (system: f nixpkgs.legacyPackages.${system});
in {
devShells = forSystems (
pkgs: {
default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.clang-tools
(pkgs.sbcl.withPackages (p:
with p; [
alexandria
cl-ppcre
iterate
split-sequence
str
]))
pkgs.haskell-language-server
pkgs.stylish-haskell
(pkgs.ghc.withPackages (p:
with p; [
containers
extra
multiset
regex-compat
split
text
text-icu
unordered-containers
universe-base
vector
]))
];
CXXFLAGS = "-std=c++20 -Wall";
};
}
);
formatter = forSystems (pkgs: pkgs.alejandra);
};
}