-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
48 lines (41 loc) · 1008 Bytes
/
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
48
{
system ? builtins.currentSystem
# Rust stuff
, nixpkgsMozilla ? builtins.fetchGit {
url = https://github.com/mozilla/nixpkgs-mozilla;
ref = "master";
}
, cargo2nix ? builtins.fetchGit {
url = https://github.com/tenx-tech/cargo2nix;
ref = "master";
}
}:
let
rustOverlay = import "${nixpkgsMozilla}/rust-overlay.nix";
cargo2nixOverlay = import "${cargo2nix}/overlay";
pkgs = import <nixpkgs> {
inherit system;
overlays = [ rustOverlay cargo2nixOverlay ];
};
rustPkgs = pkgs.rustBuilder.makePackageSet' {
rustChannel = "nightly";
packageFun = import ./Cargo.nix;
};
in
(rustPkgs.workspace.vcpu {}).overrideAttrs (
old: rec {
buildInputs = old.buildInputs ++ [
pkgs.llvmPackages.libclang
];
configurePhase =
with pkgs.llvmPackages;
old.configurePhase + ''
export LIBCLANG_PATH="${libclang}/lib"
'';
shellHook =
with pkgs.llvmPackages;
''
export LIBCLANG_PATH="${libclang}/lib"
'';
}
)