mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-13 00:14:43 +00:00
33a5eb7be1
clang-ocl: 5.3.3 → 5.4.0 hip: 5.3.3 → 5.4.0 hipsparse: 5.3.3 → 5.4.0 miopengemm: 5.3.3 → 5.4.0 hipcub: 5.3.3 → 5.4.0 rccl: 5.3.3 → 5.4.0 rocblas: 5.3.3 → 5.4.0 rocfft: 5.3.3 → 5.4.0 miopen: 5.3.3 → 5.4.0 rocm-comgr: 5.3.3 → 5.4.0 rocclr: 5.3.3 → 5.4.0 rocm-device-libs: 5.3.3 → 5.4.0 rocm-cmake: 5.3.3 → 5.4.0 rocm-runtime: 5.3.3 → 5.4.0 rocm-smi: 5.3.3 → 5.4.0 rocm-thunk: 5.3.3 → 5.4.0 rocm-opencl-runtime: 5.3.3 → 5.4.0 llvmPackages_rocm.llvm: 5.3.3 → 5.4.0 rocminfo: 5.3.3 → 5.4.0 rocmlir: 5.3.3 → 5.4.0 rocprim: 5.3.3 → 5.4.0 rocwmma: 5.3.3 → 5.4.0 rocrand: 5.3.3 → 5.4.0 rocsparse: 5.3.3 → 5.4.0 rocthrust: 5.3.3 → 5.4.0 tensile: 5.3.3 → 5.4.0 rocm-llvm: remove obsolete patch hip: remove obsolete substituteInPlace rocmlir: fixup build inputs and cmakeFlags miopen: add nlohmann_json
54 lines
1.6 KiB
Nix
54 lines
1.6 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, writeScript
|
|
, cmake
|
|
, pkg-config
|
|
, libdrm
|
|
, numactl
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "rocm-thunk";
|
|
version = "5.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "RadeonOpenCompute";
|
|
repo = "ROCT-Thunk-Interface";
|
|
rev = "rocm-${finalAttrs.version}";
|
|
hash = "sha256-EU5toaKzVeZpdm/YhaQ0bXq0eoYwYQ5qGLUJzxgZVjE=";
|
|
};
|
|
|
|
preConfigure = ''
|
|
export cmakeFlags="$cmakeFlags "
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ libdrm numactl ];
|
|
|
|
# https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/75
|
|
postPatch = ''
|
|
substituteInPlace libhsakmt.pc.in \
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
'';
|
|
|
|
postInstall = ''
|
|
cp -r $src/include $out
|
|
'';
|
|
|
|
passthru.updateScript = writeScript "update.sh" ''
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl jq common-updater-scripts
|
|
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCT-Thunk-Interface/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
|
update-source-version rocm-thunk "$version" --ignore-same-hash
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Radeon open compute thunk interface";
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface";
|
|
license = with licenses; [ bsd2 mit ];
|
|
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
|
|
};
|
|
})
|