solutions/shell.nix

36 lines
1.1 KiB
Nix
Raw Normal View History

2021-04-26 08:38:54 +00:00
let
mozillaOverlay =
import (builtins.fetchGit {
url = "https://github.com/mozilla/nixpkgs-mozilla.git";
rev = "57c8084c7ef41366993909c20491e359bbb90f54";
});
pinned = builtins.fetchGit {
# Descriptive name to make the store path easier to identify
url = "https://github.com/nixos/nixpkgs/";
# Commit hash for nixos-unstable as of 2020-04-26
# `git ls-remote https://github.com/nixos/nixpkgs nixos-unstable`
ref = "refs/heads/nixos-unstable";
rev = "1fe6ed37fd9beb92afe90671c0c2a662a03463dd";
};
nixpkgs = import pinned { overlays = [ mozillaOverlay ]; };
2021-10-04 12:02:43 +00:00
toolchain = with nixpkgs; (rustChannelOf { date = "2021-09-14"; channel = "nightly"; });
rust-wasm = toolchain.rust.override {
2021-04-26 08:38:54 +00:00
targets = [ "wasm32-unknown-unknown" ];
};
2021-04-26 08:38:54 +00:00
in
with nixpkgs; pkgs.mkShell {
buildInputs = [
clang
pkg-config
rust-wasm
2021-04-26 08:38:54 +00:00
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
2021-04-18 21:43:32 +00:00
2021-04-26 08:38:54 +00:00
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
PROTOC = "${protobuf}/bin/protoc";
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library/";
2021-04-26 08:38:54 +00:00
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
2021-04-18 21:43:32 +00:00
}