summary refs log tree commit diff
path: root/pkgs/development/libraries/rocclr
diff options
context:
space:
mode:
authorDaniël de Kok <me@danieldk.eu>2020-08-07 16:49:18 +0200
committerDaniël de Kok <me@danieldk.eu>2020-08-07 16:49:18 +0200
commit49ef0fd51a366a1256b85c150a47f88ba638aec4 (patch)
tree68e8f3056fcf65829d45628204870e27145c12c9 /pkgs/development/libraries/rocclr
parente879d83e38030fd37787ecbb01d5bddc5678c8ff (diff)
downloadnixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar.gz
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar.bz2
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar.lz
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar.xz
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.tar.zst
nixpkgs-49ef0fd51a366a1256b85c150a47f88ba638aec4.zip
rocclr: fix build (no OpenCL library is required)
rocclr builds fail since CMake was upgraded to 3.18. This version
introduces the REQUIRED option of find_library. However rocclr only
needs OpenCL headers. This change makes finding an OpenCL library
optional again.
Diffstat (limited to 'pkgs/development/libraries/rocclr')
-rw-r--r--pkgs/development/libraries/rocclr/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/libraries/rocclr/default.nix b/pkgs/development/libraries/rocclr/default.nix
index f1917b8f2c7..6b561b3c9dd 100644
--- a/pkgs/development/libraries/rocclr/default.nix
+++ b/pkgs/development/libraries/rocclr/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake rocm-cmake ];
 
-  buildInputs = [ clang rocm-comgr rocm-runtime rocm-thunk clang ];
+  buildInputs = [ clang rocm-comgr rocm-runtime rocm-thunk ];
 
   propagatedBuildInputs = [ libelf libglvnd libX11 ];
 
@@ -34,7 +34,8 @@ stdenv.mkDerivation rec {
       --replace 'set(ROCCLR_EXPORTS_FILE "''${CMAKE_CURRENT_BINARY_DIR}/amdrocclr_staticTargets.cmake")' \
         'set(ROCCLR_EXPORTS_FILE "''${CMAKE_INSTALL_LIBDIR}/cmake/amdrocclr_staticTargets.cmake")' \
       --replace 'set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ''${CMAKE_CURRENT_BINARY_DIR}/lib)' \
-        'set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ''${CMAKE_INSTALL_LIBDIR})'
+        'set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ''${CMAKE_INSTALL_LIBDIR})' \
+      --replace 'find_library( OpenCL REQUIRED' 'find_library( OpenCL'
     substituteInPlace device/comgrctx.cpp \
       --replace "libamd_comgr.so" "${rocm-comgr}/lib/libamd_comgr.so"
   '';