The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

52 lines
1.4 KiB

2 months ago
  1. { stdenv, fetchFromGitHub, autoconf, pkgconfig, cmake
  2. , cln, ginac, gmp, boost, eigen3_3, python3, googletest }:
  3. let
  4. gtest-cmake = ./gtest.cmake;
  5. in stdenv.mkDerivation rec {
  6. name = "carl-${version}";
  7. version = "18.06";
  8. buildInputs = [ cln ginac gmp boost python3 googletest ];
  9. nativeBuildInputs = [ autoconf pkgconfig cmake ];
  10. propagatedBuildInputs = [ eigen3_3 ];
  11. src = fetchFromGitHub {
  12. owner = "smtrat";
  13. repo = "carl";
  14. rev = version;
  15. sha256 = "0lb4pbs3bwpi4z4bnh5113s9c4fzq7c8iwa0952j2jrhxf4kcb8q";
  16. };
  17. enableParallelBuilding = true;
  18. cmakeFlags = [
  19. "-DEXPORT_TO_CMAKE=off"
  20. "-DUSE_CLN_NUMBERS=on"
  21. "-DTHREAD_SAFE=on"
  22. "-DUSE_GINAC=on"
  23. "-DGINAC_FOUND=on"
  24. "-DGINAC_INCLUDE_DIR=${ginac}/include/ginac"
  25. "-DGINAC_LIBRARY=${ginac}/lib/libginac.so"
  26. "-DGTEST_FOUND=on"
  27. "-DGTEST_VERSION=${googletest.version}"
  28. "-DGTEST_MAIN_LIBRARY=${googletest}/lib/libgtest_main.a"
  29. "-DGTEST_LIBRARY=${googletest}/lib/libgtest.a"
  30. ];
  31. postPatch = ''
  32. cp ${gtest-cmake} resources/gtest.cmake
  33. substituteInPlace resources/gtest.cmake --subst-var-by googletest ${googletest}
  34. sed -e '/print_resource_info("GTest"/i include(resources/gtest.cmake)' -i resources/resources.cmake
  35. '';
  36. meta = with stdenv.lib; {
  37. description = "Computer ARithmetic and Logic library";
  38. homepage = http://smtrat.github.io/carl;
  39. mainainers = [ maintainers.spacefrogg ];
  40. platforms = platforms.all;
  41. };
  42. }