1
0
Fork 0
mirror of https://github.com/mitchellh/zig-overlay.git synced 2025-05-09 02:56:03 +03:00

template for zig compiler dev

This commit is contained in:
Mitchell Hashimoto 2022-08-23 09:36:18 -07:00
parent 157234d3d8
commit 66817dde5b
No known key found for this signature in database
GPG key ID: 523D5DC389D273BC
5 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,39 @@
{
description = "Zig compiler development.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Used for shell.nix
flake-compat = { url = github:edolstra/flake-compat; flake = false; };
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cmake
gdb
libxml2
ninja
qemu
wasmtime
zlib
] ++ (with llvmPackages_14; [
clang
clang-unwrapped
lld
llvm
]);
hardeningDisable = [ "all" ];
};
# For compatibility with older versions of the `nix` binary
devShell = self.devShells.${system}.default;
}
);
}