forked from tenzir/tenzir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
25 lines (25 loc) · 840 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
{ nixpkgs ? import ./nix/pinned.nix
, pkgs ? import ./nix { nixpkgs = nixpkgs; }
, useClang ? pkgs.stdenv.isDarwin
}:
let
inherit (pkgs) lib;
llvmPkgs = pkgs.buildPackages.llvmPackages_12;
stdenv = if useClang then llvmPkgs.stdenv else pkgs.gcc11Stdenv;
inherit (stdenv.hostPlatform) isStatic;
mkShell = pkgs.mkShell.override { inherit stdenv; };
in
mkShell ({
name = "vast-dev-" + (if useClang then "clang" else "gcc");
hardeningDisable = [ "fortify" ] ++ lib.optional isStatic "pic";
inputsFrom = [ pkgs.vast ];
# To build libcaf_openssl with bundled CAF.
buildInputs = [ pkgs.openssl ];
shellHook = ''
echo "Entering VAST environment"
'';
} // lib.optionalAttrs isStatic {
VAST_STATIC_EXECUTABLE = "ON";
} // lib.optionalAttrs (stdenv.isLinux && !isStatic) {
nativeBuildInputs = [ llvmPkgs.bintools ];
})