Use fetchurl for amd-uprof
Some checks failed
CI / build:cross (pull_request) Successful in 8s
CI / build:all (pull_request) Failing after 48s

This commit is contained in:
2026-03-09 12:24:30 +01:00
parent 8cf6101ffe
commit dcdbcc5afa

View File

@@ -1,8 +1,6 @@
{ stdenv { stdenv
, lib , lib
, curl , fetchurl
, cacert
, runCommandLocal
, autoPatchelfHook , autoPatchelfHook
, elfutils , elfutils
, glib , glib
@@ -26,26 +24,26 @@ let
tarball = "AMDuProf_Linux_x64_${version}.tar.bz2"; tarball = "AMDuProf_Linux_x64_${version}.tar.bz2";
# NOTE: Remember to update the radare2 patch below if AMDuProfPcm changes. # NOTE: Remember to update the radare2 patch below if AMDuProfPcm changes.
uprofSrc = runCommandLocal tarball { src = fetchurl {
nativeBuildInputs = [ curl ]; url = "https://download.amd.com/developer/eula/uprof/uprof-5-1/${tarball}";
outputHash = "sha256-j9gxcBcIg6Zhc5FglUXf/VV9bKSo+PAKeootbN7ggYk="; sha256 = "sha256-jAmsw/xmctJ2r7BKyuA+9exLgZbu3cvrYtyRUUTt8sM=";
SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"; curlOptsList = [
} '' "-H" "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0"
curl \ "-H" "'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'"
-o $out \ "-H" "Accept-Language: en-US,en;q=0.5"
'https://download.amd.com/developer/eula/uprof/uprof-5-1/${tarball}' \ "-H" "Accept-Encoding: gzip, deflate, br, zstd"
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0' \ "-H" "Referer: https://www.amd.com/"
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ ];
-H 'Accept-Language: en-US,en;q=0.5' \ downloadToTemp = true;
-H 'Accept-Encoding: gzip, deflate, br, zstd' \ postFetch = ''
-H 'Referer: https://www.amd.com/' 2>&1 | tr '\r' '\n' cat "$downloadedFile" | tr '\r' '\n' > "$out"
''; '';
};
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "AMD-uProf"; pname = "AMD-uProf";
inherit version; inherit src version;
src = uprofSrc;
dontStrip = true; dontStrip = true;
phases = [ "installPhase" "fixupPhase" ]; phases = [ "installPhase" "fixupPhase" ];
nativeBuildInputs = [ autoPatchelfHook radare2 ]; nativeBuildInputs = [ autoPatchelfHook radare2 ];