blob: 6c366be8b42f3d700b4b9cafd80de7374707a2c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ lib, stdenv, fetchFromGitHub, writeScript, cmake }:
stdenv.mkDerivation rec {
pname = "rocm-cmake";
version = "4.5.2";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm-cmake";
rev = "rocm-${version}";
hash = "sha256-5RwhIIOtqeMl/Gyufl5U1gTEpoCjdPJP5MbVnhEKYMM=";
};
nativeBuildInputs = [ cmake ];
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-cmake/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
update-source-version rocm-cmake "$version"
'';
meta = with lib; {
description = "CMake modules for common build tasks for the ROCm stack";
homepage = "https://github.com/RadeonOpenCompute/rocm-cmake";
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
}
|