tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
rocminfo: add update script
Sebastian Neubauer
4 years ago
9d269a87
6e93fa31
+16
-1
1 changed file
expand all
collapse all
unified
split
pkgs
development
tools
rocminfo
default.nix
+16
-1
pkgs/development/tools/rocminfo/default.nix
···
1
1
-
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, rocm-runtime, python3, rocm-cmake, busybox, gnugrep
1
1
+
{ stdenv, lib, fetchFromGitHub, writeScript, fetchpatch, cmake, rocm-runtime, python3, rocm-cmake, busybox, gnugrep
2
2
# rocminfo requires that the calling user have a password and be in
3
3
# the video group. If we let rocm_agent_enumerator rely upon
4
4
# rocminfo's output, then it, too, has those requirements. Instead,
···
35
35
'' + lib.optionalString (defaultTargets != []) ''
36
36
echo '${lib.concatStringsSep "\n" defaultTargets}' > $out/bin/target.lst
37
37
'';
38
38
+
39
39
+
passthru.updateScript = writeScript "update.sh" ''
40
40
+
#!/usr/bin/env nix-shell
41
41
+
#!nix-shell -i bash -p curl jq common-updater-scripts
42
42
+
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/rocminfo/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
43
43
+
update-source-version rocminfo "$version"
44
44
+
'';
45
45
+
46
46
+
meta = with lib; {
47
47
+
description = "ROCm Application for Reporting System Info";
48
48
+
homepage = "https://github.com/RadeonOpenCompute/rocminfo";
49
49
+
license = licenses.ncsa;
50
50
+
maintainers = with maintainers; [ lovesegfault ];
51
51
+
platforms = platforms.linux;
52
52
+
};
38
53
}