diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2025-04-13 17:57:37 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2025-04-14 22:43:55 +0200 |
commit | 5e04bc7e1ef4cb0b02ac8e1676380516ca005a2c (patch) | |
tree | 64c66efecdf8d947949a6253ee8730ff1856896f | |
parent | 5241850c56cfbfebb12aef48b30e169b60f66f23 (diff) | |
download | zig-playground-5e04bc7e1ef4cb0b02ac8e1676380516ca005a2c.tar.gz zig-playground-5e04bc7e1ef4cb0b02ac8e1676380516ca005a2c.zip |
setup: add nix flake for dev env setup
"nix develop" to interactively entering the dev env.
"nix develop --command zig zen" to run command in dev env.
-rw-r--r-- | flake.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ab93306 --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + description = "Zig development environment"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }: let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + devShells.${system}.default = pkgs.mkShell { + buildInputs = [ + pkgs.zig + pkgs.zls + ]; + }; + }; +} |