Skip to content

Instantly share code, notes, and snippets.

@steinitznavican
Created July 31, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steinitznavican/e0b45a5dc0fa3ce8123dfa144d4a9d8a to your computer and use it in GitHub Desktop.
Save steinitznavican/e0b45a5dc0fa3ce8123dfa144d4a9d8a to your computer and use it in GitHub Desktop.
Post Install
{ 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;
};
}
@steinitznavican
Copy link
Author

/nix/store/sy5iwww8nc4a7mdb3ls44q96i0kxy2dx-cmake-3.14.5/bin/cmake -S/private/var/folders/1g/xdjj8dy15k932b80r197qcnr0000gp/T/nix-build-sundials-3.2.1.drv-0/sundials-3.2.1/build/LapackTest -B/private/var/folders/1g/xdjj8dy15k932b80r197qcnr0000gp/T/nix-build-sundials-3.2.1.drv-0/sundials-3.2.1/build/LapackTest --check-build-system CMakeFiles/Makefile.cmake 0
-- The C compiler identification is Clang 7.1.0
-- Check for working C compiler: /nix/store/b8i7jqbkq80h6v03pnnkpihiq72iplwq-clang-wrapper-7.1.0/bin/clang
-- Check for working C compiler: /nix/store/b8i7jqbkq80h6v03pnnkpihiq72iplwq-clang-wrapper-7.1.0/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /private/var/folders/1g/xdjj8dy15k932b80r197qcnr0000gp/T/nix-build-sundials-3.2.1.drv-0/sundials-3.2.1/build/LapackTest
/nix/store/sy5iwww8nc4a7mdb3ls44q96i0kxy2dx-cmake-3.14.5/bin/cmake -E cmake_progress_start /private/var/folders/1g/xdjj8dy15k932b80r197qcnr0000gp/T/nix-build-sundials-3.2.1.drv-0/sundials-3.2.1/build/LapackTest/CMakeFiles /private/var/folders/1g/xdjj8dy15k932b80r197qcnr0000gp/T/nix-build-sundials-3.2.1.drv-0/sundials-3.2.1/build/LapackTest/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/nix/store/84h3i703qzjkf876pxvc7ny9vqcqj28i-sundials-3.2.1/easytofind/LapackTest'
make[1]: CMakeFiles/Makefile2: No such file or directory
make[1]: *** No rule to make target 'CMakeFiles/Makefile2'.  Stop.
make[1]: Leaving directory '/nix/store/84h3i703qzjkf876pxvc7ny9vqcqj28i-sundials-3.2.1/easytofind/LapackTest'
make: *** [Makefile:87: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment