zig compiler and linked zls from nix
This commit is contained in:
26
flake.nix
Normal file
26
flake.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
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)"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user