init zig flake

This commit is contained in:
Priec
2026-02-23 21:57:31 +01:00
commit fe4af063e0
2 changed files with 233 additions and 0 deletions

29
flake.nix Normal file
View File

@@ -0,0 +1,29 @@
{
description = "Zig Master Development Environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
zig-overlay.url = "github:mitchellh/zig-overlay";
zls-overlay.url = "github:zigtools/zls";
};
outputs = { self, nixpkgs, zig-overlay, zls-overlay, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
zig = zig-overlay.packages.${system}.master;
zls = zls-overlay.packages.${system}.zls;
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
zig
zls
];
shellHook = ''
echo "Entering Zig Master Environment"
echo "Zig: $(zig version)"
echo "ZLS: $(zls --version)"
'';
};
};
}