From ad5e2dc56db6f962392a1c5d8ed236f1b88865c1 Mon Sep 17 00:00:00 2001 From: kaichao Date: Sat, 24 Oct 2020 19:06:08 +0800 Subject: [PATCH] Nix shell sync with Substrate (#100) * nix shell config * fix darwin * update nightly for nix shell --- shell.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..dcd723f --- /dev/null +++ b/shell.nix @@ -0,0 +1,25 @@ +let + mozillaOverlay = + import (builtins.fetchGit { + url = "https://github.com/mozilla/nixpkgs-mozilla.git"; + rev = "57c8084c7ef41366993909c20491e359bbb90f54"; + }); + nixpkgs = import { 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"; +}