python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / rocm-device-libs / default.nix
blobd9ada30e155dffc6cc9170061874ea20d67b40f9
1 { lib, stdenv
2 , fetchFromGitHub
3 , writeScript
4 , cmake
5 , clang
6 , llvm
7 }:
9 stdenv.mkDerivation rec {
10   pname = "rocm-device-libs";
11   version = "5.3.1";
13   src = fetchFromGitHub {
14     owner = "RadeonOpenCompute";
15     repo = "ROCm-Device-Libs";
16     rev = "rocm-${version}";
17     hash = "sha256-rKMe0B/pkDek/ZU37trnJNa8aqvlwxobPb1+VTx/bJU=";
18   };
20   nativeBuildInputs = [ cmake ];
22   buildInputs = [ clang llvm ];
24   cmakeFlags = [
25     "-DCMAKE_PREFIX_PATH=${llvm}/lib/cmake/llvm;${llvm}/lib/cmake/clang"
26     "-DLLVM_TARGETS_TO_BUILD='AMDGPU;X86'"
27     "-DCLANG=${clang}/bin/clang"
28   ];
30   patches = [ ./cmake.patch ];
32   passthru.updateScript = writeScript "update.sh" ''
33     #!/usr/bin/env nix-shell
34     #!nix-shell -i bash -p curl jq common-updater-scripts
35     version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-Device-Libs/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
36     update-source-version rocm-device-libs "$version"
37   '';
39   meta = with lib; {
40     description = "Set of AMD-specific device-side language runtime libraries";
41     homepage = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs";
42     license = licenses.ncsa;
43     maintainers = with maintainers; [ lovesegfault Flakebi ];
44     platforms = platforms.linux;
45   };