Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let
- pkgs = import <nixpkgs> {};
- unstable = import <nixos-unstable> {};
- cxxopts = import ./cxxopts.nix;
- qcachegrind = unstable.libsForQt5.callPackage ./qcachegrind.nix {};
- tbb = unstable.tbb.overrideAttrs (old: rec {
- installPhase = old.installPhase + ''
- ${pkgs.cmake}/bin/cmake \
- -DINSTALL_DIR="$out"/lib/cmake/TBB \
- -DSYSTEM_NAME=Linux -DTBB_VERSION_FILE="$out"/include/tbb/tbb_stddef.h \
- -P cmake/tbb_config_installer.cmake
- '';
- });
- eigen_trunk = unstable.eigen.overrideAttrs (old: rec {
- src = unstable.fetchgit {
- url = "https://gitlab.com/libeigen/eigen.git";
- rev = "2fd8a5a08fece826d211a6f34d777bb65f6b4562";
- sha256 = "045ir8vc41cd8qf6www9pblz6hl41zfbbx4mi21b55y1kr5fcxla";
- fetchSubmodules = false;
- };
- patches = [ ./include-dir.patch ];
- });
- ceres_trunk = unstable.ceres-solver.overrideAttrs (old: rec {
- buildInputs = [ eigen_trunk unstable.glog ];
- src = unstable.fetchgit {
- url = "https://github.com/ceres-solver/ceres-solver.git";
- rev = "8c36bcc81fbd4f78a2faa2c914ef40af264f4c31";
- sha256 = "15sacm0s04s050cc661i951ylj2j3b4kxqdv9pdz46pk94jsq00r";
- fetchSubmodules = false;
- };
- cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DCXX11=ON" "-DTBB=ON" "-DOPENMP=OFF" "-DBUILD_SHARED_LIBS=ON" ];
- });
- fmt = unstable.fmt.overrideAttrs(old: { outputs = [ "out" ]; });
- in
- #pkgs.llvmPackages_9.stdenv.mkDerivation {
- unstable.gcc9Stdenv.mkDerivation {
- name = "myenv";
- hardeningDisable = [ "all" ];
- buildInputs = with unstable; [
- # python environment for bindings and scripting
- (pkgs.python38.withPackages (ps: with ps; [ pip numpy pandas pybind11 colorama coloredlogs seaborn sphinx recommonmark sphinx_rtd_theme ]))
- # Project dependencies
- bear # generate compilation database
- gdb
- valgrind
- heaptrack
- git
- cmake
- tbb
- eigen_trunk
- ceres_trunk
- openlibm
- gperftools
- jemalloc
- fmt
- glog
- catch2
- # visualize profile results
- qcachegrind
- massif-visualizer
- graphviz
- cxxopts
- ];
- }
Add Comment
Please, Sign In to add comment