bogdb

Untitled

May 7th, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. let
  2. pkgs = import <nixpkgs> {};
  3. unstable = import <nixos-unstable> {};
  4. cxxopts = import ./cxxopts.nix;
  5. qcachegrind = unstable.libsForQt5.callPackage ./qcachegrind.nix {};
  6. tbb = unstable.tbb.overrideAttrs (old: rec {
  7. installPhase = old.installPhase + ''
  8. ${pkgs.cmake}/bin/cmake \
  9. -DINSTALL_DIR="$out"/lib/cmake/TBB \
  10. -DSYSTEM_NAME=Linux -DTBB_VERSION_FILE="$out"/include/tbb/tbb_stddef.h \
  11. -P cmake/tbb_config_installer.cmake
  12. '';
  13. });
  14. eigen_trunk = unstable.eigen.overrideAttrs (old: rec {
  15. src = unstable.fetchgit {
  16. url = "https://gitlab.com/libeigen/eigen.git";
  17. rev = "2fd8a5a08fece826d211a6f34d777bb65f6b4562";
  18. sha256 = "045ir8vc41cd8qf6www9pblz6hl41zfbbx4mi21b55y1kr5fcxla";
  19. fetchSubmodules = false;
  20. };
  21. patches = [ ./include-dir.patch ];
  22. });
  23. ceres_trunk = unstable.ceres-solver.overrideAttrs (old: rec {
  24. buildInputs = [ eigen_trunk unstable.glog ];
  25. src = unstable.fetchgit {
  26. url = "https://github.com/ceres-solver/ceres-solver.git";
  27. rev = "8c36bcc81fbd4f78a2faa2c914ef40af264f4c31";
  28. sha256 = "15sacm0s04s050cc661i951ylj2j3b4kxqdv9pdz46pk94jsq00r";
  29. fetchSubmodules = false;
  30. };
  31. cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DCXX11=ON" "-DTBB=ON" "-DOPENMP=OFF" "-DBUILD_SHARED_LIBS=ON" ];
  32. });
  33. fmt = unstable.fmt.overrideAttrs(old: { outputs = [ "out" ]; });
  34. in
  35. #pkgs.llvmPackages_9.stdenv.mkDerivation {
  36. unstable.gcc9Stdenv.mkDerivation {
  37. name = "myenv";
  38. hardeningDisable = [ "all" ];
  39.  
  40. buildInputs = with unstable; [
  41. # python environment for bindings and scripting
  42. (pkgs.python38.withPackages (ps: with ps; [ pip numpy pandas pybind11 colorama coloredlogs seaborn sphinx recommonmark sphinx_rtd_theme ]))
  43. # Project dependencies
  44. bear # generate compilation database
  45. gdb
  46. valgrind
  47. heaptrack
  48. git
  49. cmake
  50. tbb
  51. eigen_trunk
  52. ceres_trunk
  53. openlibm
  54. gperftools
  55. jemalloc
  56. fmt
  57. glog
  58. catch2
  59. # visualize profile results
  60. qcachegrind
  61. massif-visualizer
  62. graphviz
  63. cxxopts
  64. ];
  65. }
Add Comment
Please, Sign In to add comment