2020-06-11 19:04:16 +02:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, libconfig
|
|
|
|
, nanos6
|
|
|
|
, mpi
|
|
|
|
, uthash
|
|
|
|
, overrideCC
|
|
|
|
, llvmPackages_10
|
|
|
|
, fftw
|
2020-06-15 11:54:22 +02:00
|
|
|
, tampi
|
|
|
|
, hdf5
|
|
|
|
, libgcc
|
|
|
|
, strace
|
|
|
|
, gcc
|
2020-06-11 19:04:16 +02:00
|
|
|
}:
|
|
|
|
|
2020-06-15 11:54:22 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2020-06-11 19:04:16 +02:00
|
|
|
name = "cpic";
|
|
|
|
|
2020-06-15 11:54:22 +02:00
|
|
|
# Use my current cpic version, so I can test changes without commits
|
|
|
|
src = /home/Computational/rarias/cpic;
|
|
|
|
|
2020-06-11 19:04:16 +02:00
|
|
|
# src = builtins.fetchGit {
|
|
|
|
# url = "https://github.com/rodarima/cpic";
|
|
|
|
## rev = "73bd70448587f0925b89e24c8f17e412ea3958e6";
|
|
|
|
# ref = "master";
|
|
|
|
# };
|
|
|
|
|
2020-06-15 11:54:22 +02:00
|
|
|
postConfigure = ''
|
|
|
|
env | grep NIX
|
|
|
|
'';
|
|
|
|
|
2020-06-11 19:04:16 +02:00
|
|
|
|
2020-06-15 11:54:22 +02:00
|
|
|
preConfigure = ''
|
2020-06-11 19:04:16 +02:00
|
|
|
export NANOS6_HOME="${nanos6}"
|
2020-06-15 12:45:16 +02:00
|
|
|
export TAMPI_HOME="${tampi}"
|
2020-06-11 19:04:16 +02:00
|
|
|
'';
|
|
|
|
|
2020-06-15 11:54:22 +02:00
|
|
|
#enableParallelBuilding = true;
|
2020-06-15 12:58:27 +02:00
|
|
|
dontStrip = true;
|
2020-06-11 19:04:16 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libconfig
|
|
|
|
nanos6
|
|
|
|
mpi
|
|
|
|
uthash
|
2020-06-15 11:54:22 +02:00
|
|
|
# llvmPackages_10.bintools
|
2020-06-11 19:04:16 +02:00
|
|
|
fftw
|
2020-06-15 12:45:16 +02:00
|
|
|
tampi
|
2020-06-15 11:54:22 +02:00
|
|
|
hdf5
|
|
|
|
libgcc
|
|
|
|
strace
|
|
|
|
gcc
|
2020-06-11 19:04:16 +02:00
|
|
|
];
|
2020-06-15 11:54:22 +02:00
|
|
|
|
|
|
|
# Doesnt work
|
|
|
|
# export LIBRARY_PATH=${libgcc}/lib
|
|
|
|
# export LD_LIBRARY_PATH=${libgcc}/lib
|
|
|
|
# buildPhase = ''
|
|
|
|
# #NIX_DEBUG=5 strace -ff -s99999 -e trace=execve make SHELL='bash -x'
|
|
|
|
# NIX_DEBUG=5 strace -ff -s99999 -e trace=execve make SHELL='bash -x'
|
|
|
|
# '';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp cpic $out/bin/cpic
|
|
|
|
'';
|
2020-06-11 19:04:16 +02:00
|
|
|
}
|