Advertisement
Guest User

Untitled

a guest
Mar 28th, 2019
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. let
  2. pkgs = import <nixpkgs> {};
  3. stdenv = pkgs.stdenv;
  4.  
  5. in stdenv.mkDerivation {
  6. name = "env";
  7. nativeBuildInputs = [
  8. pkgs.cmake
  9. ];
  10.  
  11. buildInputs = [
  12. pkgs.zlib
  13. pkgs.boost
  14. pkgs.qt5.full
  15. pkgs.opencl-headers
  16. pkgs.ocl-icd
  17. ];
  18.  
  19. cmakeFlags = with stdenv; [
  20. "-DCMAKE_BUILD_TYPE=Release"
  21. "-DZLIB_INCLUDE_DIR=${pkgs.zlib.dev}/include"
  22. "-DZLIB_LIBRARY=${pkgs.zlib}/lib/libz.so"
  23. "-DOpenCL_LIBRARY=${pkgs.ocl-icd}/lib/libOpenCL.so"
  24. "-DOpenCL_INCLUDE_DIR=${pkgs.opencl-headers}/include"
  25. ];
  26.  
  27. PKG_CONFIG_PATH = "${pkgs.zlib}/lib/pkgconfig";
  28. BOOST_ROOT = "${pkgs.boost.dev}";
  29. BOOST_INCLUDEDIR = "${pkgs.boost.dev}/include";
  30. BOOST_LIBRARYDIR = "${pkgs.boost}/lib";
  31. LIBRARY_PATH = "${pkgs.ocl-icd}/lib:${pkgs.boost}/lib:${pkgs.zlib}/lib";
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement