uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
89
pkgs/development/libraries/rocm-opencl-runtime/default.nix
Normal file
89
pkgs/development/libraries/rocm-opencl-runtime/default.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, writeScript
|
||||
, addOpenGLRunpath
|
||||
, cmake
|
||||
, rocm-cmake
|
||||
, clang
|
||||
, clang-unwrapped
|
||||
, glew
|
||||
, libglvnd
|
||||
, libX11
|
||||
, lld
|
||||
, llvm
|
||||
, mesa
|
||||
, numactl
|
||||
, python3
|
||||
, rocclr
|
||||
, rocm-comgr
|
||||
, rocm-device-libs
|
||||
, rocm-runtime
|
||||
, rocm-thunk
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rocm-opencl-runtime";
|
||||
version = "5.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RadeonOpenCompute";
|
||||
repo = "ROCm-OpenCL-Runtime";
|
||||
rev = "rocm-${version}";
|
||||
hash = "sha256-O7q3uTjspO/rZ2+8+g7pRfBXsCRaEr4DZxEqABHbOeY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake rocm-cmake ];
|
||||
|
||||
buildInputs = [
|
||||
clang
|
||||
clang-unwrapped
|
||||
glew
|
||||
libglvnd
|
||||
libX11
|
||||
lld
|
||||
llvm
|
||||
mesa
|
||||
numactl
|
||||
python3
|
||||
rocm-comgr
|
||||
rocm-device-libs
|
||||
rocm-runtime
|
||||
rocm-thunk
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DAMD_OPENCL_PATH=${src}"
|
||||
"-DROCCLR_PATH=${rocclr}"
|
||||
"-DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm/opencl"
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
# Remove clinfo, which is already provided through the
|
||||
# `clinfo` package.
|
||||
postInstall = ''
|
||||
rm -rf $out/bin
|
||||
'';
|
||||
|
||||
# Fix the ICD installation path for NixOS
|
||||
postPatch = ''
|
||||
substituteInPlace khronos/icd/loader/linux/icd_linux.c \
|
||||
--replace 'ICD_VENDOR_PATH' '"${addOpenGLRunpath.driverLink}/etc/OpenCL/vendors/"'
|
||||
'';
|
||||
|
||||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-OpenCL-Runtime/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocm-opencl-runtime "$version"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "OpenCL runtime for AMD GPUs, part of the ROCm stack";
|
||||
homepage = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
maintainers = with maintainers; [ acowley lovesegfault ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue