Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, rocmUpdateScript 5, substituteAll 6, llvm 7, rocm-runtime 8, rocminfo 9, lsb-release 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "hip-common"; 14 version = "5.4.2"; 15 16 src = fetchFromGitHub { 17 owner = "ROCm-Developer-Tools"; 18 repo = "HIP"; 19 rev = "rocm-${finalAttrs.version}"; 20 hash = "sha256-44CZWk6EsP5EduzBCBbOh2kshS89qOm4v3mx/xNDzV0="; 21 }; 22 23 patches = [ 24 (substituteAll { 25 src = ./0000-fixup-paths.patch; 26 inherit llvm rocminfo; 27 clang = stdenv.cc; 28 rocm_runtime = rocm-runtime; 29 lsb_release = lsb-release; 30 }) 31 ]; 32 33 dontConfigure = true; 34 dontBuild = true; 35 36 installPhase = '' 37 runHook preInstall 38 39 mkdir -p $out 40 mv * $out 41 42 runHook postInstall 43 ''; 44 45 passthru.updateScript = rocmUpdateScript { 46 name = finalAttrs.pname; 47 owner = finalAttrs.src.owner; 48 repo = finalAttrs.src.repo; 49 }; 50 51 meta = with lib; { 52 description = "C++ Heterogeneous-Compute Interface for Portability"; 53 homepage = "https://github.com/ROCm-Developer-Tools/HIP"; 54 license = with licenses; [ mit ]; 55 maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members; 56 platforms = platforms.linux; 57 broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version; 58 }; 59})