Skip to content

Instantly share code, notes, and snippets.

@knedlsepp
Last active December 19, 2017 22:57
Show Gist options
  • Save knedlsepp/8969812352cd1a339f4d3f16090790f9 to your computer and use it in GitHub Desktop.
Save knedlsepp/8969812352cd1a339f4d3f16090790f9 to your computer and use it in GitHub Desktop.
{nixpkgs, ngsolveSrc}:
rec {
build = with import <nixpkgs> { };
releaseTools.nixBuild {
name = "ngsolve";
src = ngsolveSrc;
doCheck = true;
preConfigure = ''
echo "Prevent ngsolve from downloading catch manually"
substituteInPlace CMakeLists.txt \
--replace 'include(''${CMAKE_CURRENT_LIST_DIR}/cmake/external_projects/catch.cmake)' ' '
substituteInPlace tests/catch/CMakeLists.txt \
--replace 'add_dependencies(catch_main project_catch)' ' '
'';
cmakeFlags = [
"-DENABLE_UNIT_TESTS=ON"
"-DCATCH_INCLUDE_DIR=${catch}/include"
];
buildInputs = [
cmake
git
openblas
openmpi
zlib
python3
tcl
tk
mesa
opencascade
xorg.libXmu
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment