Add vendor infrastructure
This commit is contained in:
@@ -20,6 +20,8 @@ in
|
||||
|
||||
{
|
||||
|
||||
pkg = myopenblas;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
myopenblas
|
||||
scalapack
|
||||
|
||||
27
etc/nix/vendor-shell.nix
Normal file
27
etc/nix/vendor-shell.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
rec {
|
||||
|
||||
directory = "vendor";
|
||||
src = ''
|
||||
|
||||
_add_vendor_cpath () {
|
||||
export CPATH=$CPATH:$1
|
||||
mkdir -p ${directory}/include
|
||||
ln -frs $1/* ${directory}/include/
|
||||
}
|
||||
|
||||
_add_vendor_lib () {
|
||||
mkdir -p ${directory}/lib
|
||||
ln -frs $1/* ${directory}/lib/
|
||||
}
|
||||
|
||||
'';
|
||||
|
||||
cpath = path: ''
|
||||
_add_vendor_cpath ${path}
|
||||
'';
|
||||
|
||||
lib = path: ''
|
||||
_add_vendor_lib ${path}
|
||||
'';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user