forked from openebs/mayastor-dependencies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
41 lines (39 loc) · 922 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ profile ? "nightly", date ? "2023-02-06" }:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {
overlays = [ (_: _: { inherit sources; }) (import ./nix/overlay.nix { }) ];
};
rust = import sources.nixpkgs { overlays = [ (import sources.rust-overlay) ]; };
in
let
rust-bin =
(rust.rust-bin.${profile}.${date}.default.override {
extensions = [ "rust-src" ];
});
in
with pkgs;
pkgs.mkShell {
buildInputs = [
rust-bin
cacert
cargo-udeps
clang
openssl
pkg-config
pre-commit
protobuf
udev
util-linux
commitlint
git
];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
NODE_PATH = "${nodePackages."@commitlint/config-conventional"}/lib/node_modules";
shellHook = ''
pre-commit install
pre-commit install --hook commit-msg
'';
}