Created
July 31, 2019 07:35
-
-
Save steinitznavican/e0b45a5dc0fa3ce8123dfa144d4a9d8a to your computer and use it in GitHub Desktop.
Post Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ cmake | |
, fetchurl | |
, python | |
, stdenv | |
, liblapack | |
, openblas | |
, gfortran | |
, lapackSupport ? true }: | |
stdenv.mkDerivation rec { | |
pname = "sundials"; | |
version = "3.2.1"; | |
src = fetchurl { | |
url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz"; | |
sha256 = "0238r1qnwqz13wcjzfsbcfi8rfnlxcjjmxq2vpf2qf5jgablvna7"; | |
}; | |
buildInputs = [ python ] ++ | |
stdenv.lib.optionals (lapackSupport) [ openblas liblapack gfortran ]; | |
nativeBuildInputs = [ cmake ]; | |
cmakeFlags = [ | |
"-DEXAMPLES_INSTALL_PATH=${placeholder "out"}/share/examples" | |
"-DEXAMPLES_INSTALL=ON" | |
"-DEXAMPLES_ENABLE_C=ON" | |
] ++ stdenv.lib.optionals (lapackSupport) [ | |
"-DSUNDIALS_INDEX_TYPE=int32_t" | |
"-DLAPACK_ENABLE=ON" | |
"-DLAPACK_LIBRARIES=${openblas}/lib/libblas${stdenv.hostPlatform.extensions.sharedLibrary};${openblas}/lib/liblapack.dylib" | |
]; | |
postInstall = '' | |
mkdir $out/easytofind | |
echo $(ls) > $out/easytofind/foo.txt | |
cp -r . $out/easytofind | |
cd $out/easytofind/LapackTest | |
make | |
./ltest > $out/easytofind/ltest.out | |
''; | |
# doCheck = true; | |
# checkPhase = "make test"; | |
meta = with stdenv.lib; { | |
description = "Suite of nonlinear differential/algebraic equation solvers"; | |
homepage = https://computation.llnl.gov/projects/sundials; | |
platforms = platforms.all; | |
maintainers = [ maintainers.idontgetoutmuch ]; | |
license = licenses.bsd3; | |
}; | |
} |
Author
steinitznavican
commented
Jul 31, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment