nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 clr, 7 python3, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "hiprt"; 12 version = "3.0.3.a1525e7"; 13 14 src = fetchFromGitHub { 15 owner = "GPUOpen-LibrariesAndSDKs"; 16 repo = "HIPRT"; 17 tag = finalAttrs.version; 18 hash = "sha256-7r7KO+WuXOeQQhYLYpJRrD4ZqVsBOqaD2NGD15CWnoo="; 19 }; 20 21 postPatch = '' 22 substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib' 23 substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/' 24 ''; 25 26 nativeBuildInputs = [ 27 cmake 28 python3 29 ]; 30 31 buildInputs = [ 32 clr 33 ]; 34 35 cmakeFlags = [ 36 (lib.cmakeBool "BAKE_KERNEL" false) 37 (lib.cmakeBool "BAKE_COMPILED_KERNEL" false) 38 (lib.cmakeBool "BITCODE" true) 39 (lib.cmakeBool "PRECOMPILE" true) 40 # needs accelerator 41 (lib.cmakeBool "NO_UNITTEST" true) 42 (lib.cmakeBool "FORCE_DISABLE_CUDA" true) 43 ]; 44 45 postInstall = '' 46 mv $out/bin $out/lib 47 ln -sr $out/lib/libhiprt*64.so $out/lib/libhiprt64.so 48 install -v -Dm644 ../scripts/bitcodes/hiprt*_amd_lib_linux.bc $out/lib/ 49 ''; 50 51 meta = { 52 homepage = "https://gpuopen.com/hiprt"; 53 description = "Ray tracing library for HIP"; 54 license = lib.licenses.mit; 55 maintainers = with lib.maintainers; [ 56 mksafavi 57 ]; 58 teams = [ lib.teams.rocm ]; 59 platforms = lib.platforms.linux; 60 }; 61})