Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

rocminfo: add update script

+16 -1
+16 -1
pkgs/development/tools/rocminfo/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, fetchpatch, cmake, rocm-runtime, python3, rocm-cmake, busybox, gnugrep 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 + 39 + passthru.updateScript = writeScript "update.sh" '' 40 + #!/usr/bin/env nix-shell 41 + #!nix-shell -i bash -p curl jq common-updater-scripts 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 + update-source-version rocminfo "$version" 44 + ''; 45 + 46 + meta = with lib; { 47 + description = "ROCm Application for Reporting System Info"; 48 + homepage = "https://github.com/RadeonOpenCompute/rocminfo"; 49 + license = licenses.ncsa; 50 + maintainers = with maintainers; [ lovesegfault ]; 51 + platforms = platforms.linux; 52 + }; 38 53 }