From d868ae290c749c67fd949f224fade2bfe7c1af19 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Thu, 28 Aug 2025 10:19:25 -0400 Subject: [PATCH] Initial push --- .envrc | 1 + flake.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .envrc create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f3bddfd --- /dev/null +++ b/flake.nix @@ -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)" + ''; + }; + }); +}