mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
66 lines
1.6 KiB
Nix
66 lines
1.6 KiB
Nix
{
|
|
description = "zap endpoint tests";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/release-22.11";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
# required for latest zig
|
|
zig.url = "github:mitchellh/zig-overlay";
|
|
|
|
# required for latest neovim
|
|
neovim-flake.url = "github:neovim/neovim?dir=contrib";
|
|
neovim-flake.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# Used for shell.nix
|
|
flake-compat = {
|
|
url = github:edolstra/flake-compat;
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
...
|
|
} @ inputs: let
|
|
overlays = [
|
|
# Other overlays
|
|
(final: prev: {
|
|
zigpkgs = inputs.zig.packages.${prev.system};
|
|
neovim-nightly = inputs.neovim-flake.packages.${prev.system}.neovim;
|
|
})
|
|
];
|
|
|
|
# Our supported systems are the same supported systems as the Zig binaries
|
|
systems = builtins.attrNames inputs.zig.packages;
|
|
in
|
|
flake-utils.lib.eachSystem systems (
|
|
system: let
|
|
pkgs = import nixpkgs {inherit overlays system; };
|
|
in rec {
|
|
devShells.default = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [
|
|
neovim-nightly
|
|
zigpkgs.master
|
|
bat
|
|
wrk
|
|
python39
|
|
pkgs.rustc
|
|
pkgs.cargo
|
|
pkgs.gcc
|
|
pkgs.rustfmt
|
|
pkgs.clippy
|
|
pkgs.go
|
|
pkgs.gotools
|
|
pkgs.gopls
|
|
pkgs.golint
|
|
];
|
|
};
|
|
|
|
# For compatibility with older versions of the `nix` binary
|
|
devShell = self.devShells.${system}.default;
|
|
}
|
|
);
|
|
}
|