Skip to content

Commit

Permalink
Add shell.nix for better NixOS support (#281)
Browse files Browse the repository at this point in the history
* Add shell.nix for better NixOS support

* Check-in shell.nix
  • Loading branch information
sorpaas authored Feb 3, 2021
1 parent 05a5b8b commit 252648e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ polkadot.*

# NixOS development environment
.envrc
shell.nix
25 changes: 25 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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-23"; 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";
}

0 comments on commit 252648e

Please sign in to comment.