depot/third_party/nixpkgs/pkgs/development/compilers/hip-common/default.nix
Default email 0d9fc34957 Project import generated by Copybara.
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
2023-01-20 11:41:00 +01:00

59 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rocmUpdateScript
, substituteAll
, llvm
, rocm-runtime
, rocminfo
, lsb-release
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hip-common";
version = "5.4.2";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "HIP";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-44CZWk6EsP5EduzBCBbOh2kshS89qOm4v3mx/xNDzV0=";
};
patches = [
(substituteAll {
src = ./0000-fixup-paths.patch;
inherit llvm rocminfo;
clang = stdenv.cc;
rocm_runtime = rocm-runtime;
lsb_release = lsb-release;
})
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
mv * $out
runHook postInstall
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "C++ Heterogeneous-Compute Interface for Portability";
homepage = "https://github.com/ROCm-Developer-Tools/HIP";
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
};
})