zig-overlay/templates/compiler-dev/flake.nix

51 lines
1 KiB
Nix
Raw Normal View History

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