Nix shell sync with Substrate (#100)

* nix shell config

* fix darwin

* update nightly for nix shell
main
kaichao 2020-10-24 19:06:08 +08:00 committed by GitHub
parent 462689b2cd
commit ad5e2dc56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

25
shell.nix 100644
View File

@ -0,0 +1,25 @@
let
mozillaOverlay =
import (builtins.fetchGit {
url = "https://github.com/mozilla/nixpkgs-mozilla.git";
rev = "57c8084c7ef41366993909c20491e359bbb90f54";
});
nixpkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
rust-nightly = with nixpkgs; ((rustChannelOf { date = "2020-10-05"; channel = "nightly"; }).rust.override {
targets = [ "wasm32-unknown-unknown" ];
});
in
with nixpkgs; pkgs.mkShell {
buildInputs = [
clang
cmake
pkg-config
rust-nightly
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
PROTOC = "${protobuf}/bin/protoc";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
}