From 4366fe366a03ba7b4c901241ed782f06c9e2f055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Fri, 23 Oct 2020 10:21:59 +0100 Subject: [PATCH] build: add nix shell (#7376) --- substrate/shell.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 substrate/shell.nix diff --git a/substrate/shell.nix b/substrate/shell.nix new file mode 100644 index 0000000000..79d9e67bde --- /dev/null +++ b/substrate/shell.nix @@ -0,0 +1,23 @@ +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-01"; channel = "nightly"; }).rust.override { + targets = [ "wasm32-unknown-unknown" ]; + }); +in +with nixpkgs; pkgs.mkShell { + buildInputs = [ + clang + cmake + pkg-config + rust-nightly + ]; + + LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; + PROTOC = "${protobuf}/bin/protoc"; + ROCKSDB_LIB_DIR = "${rocksdb}/lib"; +}