nixpkgs/pkgs/development/libraries/rocm-thunk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, stdenv
2020-07-10 15:01:24 +00:00
, fetchFromGitHub
, rocmUpdateScript
2020-07-10 15:01:24 +00:00
, pkg-config
, cmake
, rocm-cmake
2021-11-08 10:08:20 +00:00
, libdrm
2020-07-10 15:01:24 +00:00
, numactl
, valgrind
, gcc
2020-07-10 15:01:24 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2020-07-10 15:01:24 +00:00
pname = "rocm-thunk";
2023-03-30 18:34:26 +00:00
version = "5.4.4";
2020-07-10 15:01:24 +00:00
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCT-Thunk-Interface";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-EU5toaKzVeZpdm/YhaQ0bXq0eoYwYQ5qGLUJzxgZVjE=";
2020-07-10 15:01:24 +00:00
};
nativeBuildInputs = [
pkg-config
cmake
rocm-cmake
];
buildInputs = [
libdrm
numactl
valgrind
gcc.cc.libgcc or null # TODO: unhack this?
];
cmakeFlags = [
# Manually define CMAKE_INSTALL_<DIR>
# See: https://github.com/NixOS/nixpkgs/pull/197838
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
2020-07-10 15:01:24 +00:00
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
2021-09-08 14:14:29 +00:00
meta = with lib; {
2020-07-10 15:01:24 +00:00
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;
2023-01-18 08:25:46 +00:00
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
2020-07-10 15:01:24 +00:00
};
})