nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 47 lines 968 B view raw
1{ 2 lib, 3 stdenv, 4 llvm, 5 cmake, 6 lsb-release, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "hipcc"; 11 # In-tree with ROCm LLVM 12 inherit (llvm.llvm) version; 13 src = llvm.llvm.monorepoSrc; 14 sourceRoot = "${finalAttrs.src.name}/amd/hipcc"; 15 strictDeps = true; 16 17 nativeBuildInputs = [ 18 llvm.rocm-toolchain 19 cmake 20 ]; 21 22 buildInputs = [ 23 llvm.clang-unwrapped 24 ]; 25 26 postPatch = '' 27 substituteInPlace src/hipBin_amd.h \ 28 --replace-fail "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release" 29 ''; 30 31 cmakeFlags = [ 32 "-DCMAKE_BUILD_TYPE=Release" 33 ]; 34 postInstall = '' 35 rm -r $out/hip/bin 36 ln -s $out/bin $out/hip/bin 37 ''; 38 39 meta = { 40 description = "Compiler driver utility that calls clang or nvcc"; 41 homepage = "https://github.com/ROCm/HIPCC"; 42 license = with lib.licenses; [ mit ]; 43 maintainers = with lib.maintainers; [ lovesegfault ]; 44 teams = [ lib.teams.rocm ]; 45 platforms = lib.platforms.linux; 46 }; 47})