forked from Trow-Registry/trow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
47 lines (40 loc) · 1.01 KB
/
default.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
42
43
44
45
46
47
with import <nixpkgs> {};
let
pkgs = import <nixpkgs> {};
date = "2018-02-25";
mozilla-overlay = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
rev = "661f3f4d8183f493252faaa4e7bf192abcf5d927";
sha256 = "0g1ig96a5qzppbf75qwll8jvc7af596ribhymzs4pbws5zh7mp6p";
};
mozilla = (import mozilla-overlay) pkgs pkgs;
rust-nightly = mozilla.rustChannelOf { date = date; channel = "nightly"; };
in
# rustPlatform.buildRustPackage rec {
stdenv.mkDerivation rec {
name = "trow";
env = buildEnv { name = name; paths = buildInputs; };
# src = lib.sourceFilesBySuffices ./. [".lock" ".toml" ".rs"];
# cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
buildInputs = [
pkgconfig
rust-nightly.rust
cmake
perl
go
sqlite
# for .proto generation
protobuf
# dev
valgrind
];
configurePhase = ''true'';
buildPhase = ''
echo "Starting the build"
cargo build -vv
'';
shellHook = ''
>&2 echo Rust Nightly: ${date}
'';
}