rocmPackages.hiprt: disable kernel encryption support

Per upstream encryption of kernels was a holdover from when hiprt was closed source.
Let's disable it and drop the need to rebuild easy-encryption.

https://github.com/GPUOpen-LibrariesAndSDKs/HIPRT/issues/11#issuecomment-2105410458
This commit is contained in:
Luna Nova
2025-09-29 08:06:22 -07:00
parent d51e74bd51
commit 882158afe0
@@ -4,7 +4,6 @@
fetchFromGitHub,
cmake,
clr,
gcc,
python3,
}:
@@ -20,13 +19,12 @@ stdenv.mkDerivation (finalAttrs: {
};
postPatch = ''
g++ contrib/easy-encryption/cl.cpp -o contrib/easy-encryption/bin/linux/ee64 #replacing prebuilt binary
rm -rf contrib/easy-encrypt # contains prebuilt easy-encrypt binaries, we disable encryption
substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib'
substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/'
'';
nativeBuildInputs = [
gcc # required for replacing easy-encryption binary
cmake
python3
];
@@ -42,6 +40,8 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "PRECOMPILE" true)
# needs accelerator
(lib.cmakeBool "NO_UNITTEST" true)
# we have no need to support baking encrypted kernels into object files
(lib.cmakeBool "NO_ENCRYPT" true)
(lib.cmakeBool "FORCE_DISABLE_CUDA" true)
];