nixpkgs/pkgs/development/tools/build-managers/rocm-cmake/default.nix

31 lines
995 B
Nix
Raw Normal View History

2021-09-08 15:14:08 +01:00
{ lib, stdenv, fetchFromGitHub, writeScript, cmake }:
2020-07-10 18:57:24 +01:00
stdenv.mkDerivation rec {
pname = "rocm-cmake";
2021-09-02 20:27:22 +01:00
version = "4.3.1";
2020-07-10 18:57:24 +01:00
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm-cmake";
rev = "rocm-${version}";
2021-09-02 20:27:22 +01:00
hash = "sha256-BhpYOL7+IlBpkzeFjfy6KLO7ail472KQWFfQX/sXLGo=";
2020-07-10 18:57:24 +01:00
};
nativeBuildInputs = [ cmake ];
2021-09-08 15:14:08 +01:00
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; {
2020-07-10 18:57:24 +01:00
description = "CMake modules for common build tasks for the ROCm stack";
homepage = "https://github.com/RadeonOpenCompute/rocm-cmake";
license = licenses.mit;
maintainers = with maintainers; [ ];
2021-03-10 10:58:56 +00:00
platforms = platforms.unix;
2020-07-10 18:57:24 +01:00
};
}