1
0
aoc23/flake.nix

36 lines
874 B
Nix
Raw Normal View History

{
description = "Advent of Code 2023";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs { inherit system; };
zig = pkgs.zig_0_11;
buildZigPackage = import ./nix/build-zig-package.nix {
inherit (pkgs) stdenv;
inherit zig;
};
in
{
devShells = {
default = pkgs.mkShellNoCC {
buildInputs = [ zig pkgs.zls ];
};
ci = pkgs.mkShellNoCC {
buildInputs = [ zig ];
};
};
packages.default = buildZigPackage {
name = "aoc23";
src = lib.cleanSource ./.;
};
});
}