-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
34 lines (27 loc) · 934 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
{ pkgs ? import <nixpkgs> {} }:
let
lib = pkgs.lib;
isDarwin = pkgs.stdenv.isDarwin;
merged-openssl = pkgs.symlinkJoin {
name = "merged-openssl";
paths = [ pkgs.openssl.out pkgs.openssl.dev ];
};
in pkgs.stdenv.mkDerivation rec {
name = "spark-candles";
env = pkgs.buildEnv { name = name; paths = buildInputs; };
buildInputs = [
pkgs.rustup
pkgs.openssl
] ++ lib.optional isDarwin pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
++ lib.optional isDarwin pkgs.darwin.apple_sdk.frameworks.CoreFoundation
++ lib.optional isDarwin pkgs.darwin.apple_sdk.frameworks.Security;
shellHook = ''
export OPENSSL_DIR="${merged-openssl}"
export RUST_LOG=info
FILE_LOG_LEVEL="info"
CONSOLE_LOG_LEVEL="info"
echo "RUST_LOG is set to $RUST_LOG"
echo "spark-candles environment is ready."
'';
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.openssl pkgs.libiconv ];
}