-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
37 lines (30 loc) · 969 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
34
35
36
{ 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 = "janitor";
env = pkgs.buildEnv { name = name; paths = buildInputs; };
buildInputs = [
# pkgs.clippy
# pkgs.rustc
# pkgs.cargo
pkgs.openssl
pkgs.lld
] ++ 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=debug
FILE_LOG_LEVEL="info"
CONSOLE_LOG_LEVEL="info"
echo "RUST_LOG is set to $RUST_LOG"
echo "janitor environment is ready."
'';
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.openssl pkgs.libiconv ];
}