Add shellHook to clang.nix
This commit is contained in:
parent
3446c6abba
commit
b44fd03b5a
@ -5,5 +5,10 @@
|
||||
clang
|
||||
llvmPackages.openmp
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export OMPI_CC=clang
|
||||
export OMPI_CXX=clang++
|
||||
'';
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
{ pkgs ? import <nixpkgs> {} , with-clang ? false }:
|
||||
|
||||
let
|
||||
|
||||
clang = import ./etc/nix/clang.nix { inherit pkgs; };
|
||||
|
||||
compiler-configuration
|
||||
= if with-clang
|
||||
then (import ./etc/nix/clang.nix { inherit pkgs; }).buildInputs
|
||||
then clang.buildInputs
|
||||
else [ pkgs.gcc ];
|
||||
|
||||
in
|
||||
@ -30,6 +33,8 @@ pkgs.mkShell {
|
||||
export OPENBLAS_PATH=${pkgs.openblas}
|
||||
export SCALAPACK_PATH=${pkgs.scalapack}
|
||||
export LD_LIBRARY_PATH=${pkgs.scalapack}/lib:$LD_LIBRARY_PATH
|
||||
'';
|
||||
''
|
||||
+ (if with-clang then clang.shellHook else "")
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user