2023-11-30 12:12:51 +11:00
|
|
|
{
|
|
|
|
description = "Advent of Code 2023";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2023-11-30 12:43:56 +11:00
|
|
|
outputs = { nixpkgs, flake-utils, ... }:
|
2023-11-30 12:12:51 +11:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
zig = pkgs.zig_0_11;
|
|
|
|
in
|
|
|
|
{
|
2023-11-30 12:48:01 +11:00
|
|
|
devShells.default = pkgs.mkShellNoCC {
|
2023-11-30 14:52:15 +11:00
|
|
|
buildInputs = [
|
|
|
|
pkgs.aoc-cli
|
|
|
|
zig
|
|
|
|
pkgs.zls
|
|
|
|
];
|
2023-11-30 12:12:51 +11:00
|
|
|
};
|
|
|
|
|
2023-11-30 12:52:45 +11:00
|
|
|
packages.default = pkgs.stdenv.mkDerivation {
|
2023-11-30 12:35:17 +11:00
|
|
|
name = "aoc23";
|
2023-11-30 12:43:56 +11:00
|
|
|
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
|
2023-11-30 12:52:45 +11:00
|
|
|
|
|
|
|
nativeBuildInputs = [ zig.hook ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Advent of Code 2023";
|
|
|
|
homepage = "https://git.xeal.me/xeals/aoc23";
|
2023-11-30 12:57:30 +11:00
|
|
|
license = nixpkgs.lib.licenses.mit;
|
2023-11-30 12:52:45 +11:00
|
|
|
inherit (zig.meta) platforms;
|
|
|
|
};
|
2023-11-30 12:35:17 +11:00
|
|
|
};
|
2023-11-30 12:12:51 +11:00
|
|
|
});
|
|
|
|
}
|