rocmPackages.hiprt: tidy, disable kernel encryption support (#443608)

authored by Masum Reza and committed by GitHub 342a4169 e0334d54

+11 -10
+11 -10
pkgs/development/rocm-modules/6/hiprt/default.nix
··· 4 fetchFromGitHub, 5 cmake, 6 clr, 7 - gcc, 8 python3, 9 }: 10 ··· 20 }; 21 22 postPatch = '' 23 - g++ contrib/easy-encryption/cl.cpp -o contrib/easy-encryption/bin/linux/ee64 #replacing prebuilt binary 24 substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib' 25 substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/' 26 ''; 27 28 nativeBuildInputs = [ 29 - gcc # required for replacing easy-encryption binary 30 cmake 31 python3 32 ]; ··· 36 ]; 37 38 cmakeFlags = [ 39 - "-D CMAKE_BUILD_TYPE=Release" 40 - "-D BAKE_KERNEL=OFF" 41 - "-D BAKE_COMPILED_KERNEL=OFF" 42 - "-D BITCODE=ON" 43 - "-D PRECOMPILE=ON" 44 - "-D NO_UNITTEST=ON" 45 - "-D FORCE_DISABLE_CUDA=ON" 46 ]; 47 48 postInstall = '' ··· 58 maintainers = with lib.maintainers; [ 59 mksafavi 60 ]; 61 platforms = lib.platforms.linux; 62 }; 63 })
··· 4 fetchFromGitHub, 5 cmake, 6 clr, 7 python3, 8 }: 9 ··· 19 }; 20 21 postPatch = '' 22 + rm -rf contrib/easy-encrypt # contains prebuilt easy-encrypt binaries, we disable encryption 23 substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib' 24 substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/' 25 ''; 26 27 nativeBuildInputs = [ 28 cmake 29 python3 30 ]; ··· 34 ]; 35 36 cmakeFlags = [ 37 + (lib.cmakeBool "BAKE_KERNEL" false) 38 + (lib.cmakeBool "BAKE_COMPILED_KERNEL" false) 39 + (lib.cmakeBool "BITCODE" true) 40 + (lib.cmakeBool "PRECOMPILE" true) 41 + # needs accelerator 42 + (lib.cmakeBool "NO_UNITTEST" true) 43 + # we have no need to support baking encrypted kernels into object files 44 + (lib.cmakeBool "NO_ENCRYPT" true) 45 + (lib.cmakeBool "FORCE_DISABLE_CUDA" true) 46 ]; 47 48 postInstall = '' ··· 58 maintainers = with lib.maintainers; [ 59 mksafavi 60 ]; 61 + teams = [ lib.teams.rocm ]; 62 platforms = lib.platforms.linux; 63 }; 64 })