feat: add Nix shell configuration

This commit is contained in:
Harsh Shandilya 2022-05-29 10:08:12 +05:30
parent ebff2c1276
commit 5fc21977b6
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80

14
shell.nix Normal file
View File

@ -0,0 +1,14 @@
with import <nixpkgs> { overlays = [ (import <rust-overlay>) ]; };
mkShell {
buildInputs = [
(rust-bin.stable.latest.default.override {
extensions =
[ "rust-src" "rustc-dev" "rustfmt-preview" "llvm-tools-preview" ];
targets =
pkgs.lib.optionals pkgs.stdenv.isDarwin [ "aarch64-apple-darwin" ]
++ pkgs.lib.optionals pkgs.stdenv.isLinux
[ "x86_64-unknown-linux-gnu" ];
})
] ++ pkgs.lib.optionals stdenv.isDarwin
[ pkgs.darwin.apple_sdk.frameworks.Security ];
}