mirror of
https://github.com/mitchellh/zig-overlay.git
synced 2025-02-05 08:52:48 +02:00
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
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_18; [
|
|
clang
|
|
clang-unwrapped
|
|
lld
|
|
llvm
|
|
]);
|
|
|
|
hardeningDisable = ["all"];
|
|
};
|
|
|
|
# For compatibility with older versions of the `nix` binary
|
|
devShell = self.devShells.${system}.default;
|
|
}
|
|
);
|
|
}
|