This commit is contained in:
Mitchell Hashimoto 2022-08-23 09:46:03 -07:00
parent b2763f8604
commit 13b0fe4dd5
No known key found for this signature in database
GPG key ID: 523D5DC389D273BC
2 changed files with 40 additions and 26 deletions

View file

@ -6,15 +6,25 @@
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
# Used for shell.nix # Used for shell.nix
flake-compat = { url = github:edolstra/flake-compat; flake = false; }; flake-compat = {
url = github:edolstra/flake-compat;
flake = false;
};
}; };
outputs = { self, nixpkgs, flake-utils, ... }@inputs: outputs = {
flake-utils.lib.eachDefaultSystem (system: self,
let pkgs = import nixpkgs { inherit system; }; nixpkgs,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
in { in {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs;
[
cmake cmake
gdb gdb
libxml2 libxml2
@ -22,14 +32,15 @@
qemu qemu
wasmtime wasmtime
zlib zlib
] ++ (with llvmPackages_14; [ ]
++ (with llvmPackages_14; [
clang clang
clang-unwrapped clang-unwrapped
lld lld
llvm llvm
]); ]);
hardeningDisable = [ "all" ]; hardeningDisable = ["all"];
}; };
# For compatibility with older versions of the `nix` binary # For compatibility with older versions of the `nix` binary

View file

@ -1,9 +1,12 @@
(import (import
( (
let flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat; in let
flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat;
in
fetchTarball { fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz"; url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz";
sha256 = flake-compat.locked.narHash; sha256 = flake-compat.locked.narHash;
} }
) )
{ src = ./.; }).shellNix {src = ./.;})
.shellNix