1
0
aoc23/flake.nix
xeals 2d65118f53
All checks were successful
Build and test / test (push) Successful in 3m3s
Use gitignoreSource to clean src
2023-11-30 12:43:56 +11:00

35 lines
865 B
Nix

{
description = "Advent of Code 2023";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
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 = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
};
});
}