Created
February 10, 2024 16:15
-
-
Save maxsei/0267535fa2f05252cbb709de7bf63592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "dev shell"; | |
| inputs.nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; | |
| inputs.flake-utils.url = "github:numtide/flake-utils"; | |
| inputs.zls.url = "github:zigtools/zls"; | |
| outputs = { self, nixpkgs, flake-utils, ... }@inputs: | |
| let | |
| zigpkgs = inputs.zls.inputs.zig-overlay.outputs.packages; | |
| overlays = [ | |
| (final: prev: { | |
| zig-versions = zigpkgs.${prev.system}; | |
| zls = inputs.zls.packages.${prev.system}.zls; | |
| }) | |
| ]; | |
| # Our supported systems are the same supported systems as the Zig binaries | |
| systems = builtins.attrNames zigpkgs; | |
| in flake-utils.lib.eachSystem systems (system: | |
| let pkgs = import nixpkgs { inherit overlays system; }; | |
| in { | |
| devShells.default = pkgs.mkShell { | |
| nativeBuildInputs = with pkgs; [ | |
| zig-versions."0.11.0" | |
| zls | |
| nodejs | |
| yarn | |
| binaryen | |
| ]; | |
| buildInputs = with pkgs; [ bashInteractive ]; | |
| shellHook = '' | |
| export SHELL=${pkgs.bashInteractive}/bin/bash | |
| ''; | |
| }; | |
| devShell = self.devShells.${system}.default; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment