-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
28 lines (27 loc) · 882 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
let
mozillaOverlay =
import (builtins.fetchGit {
url = "https://github.com/mozilla/nixpkgs-mozilla.git";
ref = "master";
});
pinned = builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs.git";
ref = "master";
};
nixpkgs = import pinned { overlays = [ mozillaOverlay ]; };
rust = with nixpkgs; (rustChannelOf { channel = "nightly"; date = "2023-09-03";}).rust;
in
with nixpkgs; pkgs.mkShell {
buildInputs = [
clang
pkg-config
openssl
rust
] ++ (lib.optionals stdenv.isDarwin [
darwin.Security
darwin.apple_sdk.frameworks.CoreFoundation
]);
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library/";
NIX_LDFLAGS = lib.optionals stdenv.isDarwin "-F${darwin.Security}/Library/Frameworks -F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks";
}