Initial push
This commit is contained in:
35
flake.nix
Normal file
35
flake.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
description = "chess_interface Development Environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
zig-overlay.url = "github:mitchellh/zig-overlay";
|
||||
zig-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, zig-overlay, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
zig-overlay.overlays.default # <-- use the flake overlay, NOT (import zig-overlay)
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
zigpkgs.master # Zig nightly (“master”)
|
||||
zls # Zig LSP (optional)
|
||||
];
|
||||
|
||||
ZIG_GLOBAL_CACHE_DIR = ".zig-cache-global";
|
||||
|
||||
shellHook = ''
|
||||
echo "Welcome to the chess_interface dev env (${system})"
|
||||
echo "Zig: $(zig version)"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user