-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
37 lines (35 loc) · 766 Bytes
/
Copy pathshell.nix
File metadata and controls
37 lines (35 loc) · 766 Bytes
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
{ pkgs ? import <nixpkgs> {}}: let
getLibFolder = pkg: "${pkg}.lib";
in
pkgs.stdenv.mkDerivation {
name = "rtest";
nativeBuildInputs = with pkgs; [
# LLVM & GCC
gcc
cmake
gnumake
pkg-config
llvmPackages.llvm
llvmPackages.clang
# Rust
rustc
cargo
rustfmt
cargo-watch
rust-analyzer
# reqwest
];
buildInputs = with pkgs; [
openssl
pkg-config
];
# Set Environment
RUST_BACKTRACE = 1;
NIX_LDFLAGS = "-L${(getLibFolder pkgs.libiconv)}";
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.gcc
pkgs.libiconv
pkgs.llvmPackages.llvm
];
}