amdvlk: 2024.Q4.2 -> 2024.Q4.3 (#369975)

This commit is contained in:
Sefa Eyeoglu
2025-01-07 17:09:42 +01:00
committed by GitHub
+11 -20
View File
@@ -3,7 +3,7 @@
callPackage,
lib,
fetchRepoProject,
writeScript,
nix-update-script,
cmake,
directx-shader-compiler,
glslang,
@@ -27,13 +27,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "amdvlk";
version = "2024.Q4.2";
version = "2024.Q4.3";
src = fetchRepoProject {
name = "amdvlk-src";
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
rev = "refs/tags/v-${finalAttrs.version}";
hash = "sha256-16eHtdxoSCVEPQNvi7Kuo7CP4yddMsZqpuRsWobEOnw=";
hash = "sha256-PQxTRCSOk8E6y7pXyqxt1QKtRsqnrj/9dQZ8NjnUbhA=";
};
buildInputs =
@@ -102,23 +102,14 @@ stdenv.mkDerivation (finalAttrs: {
# Keep the rpath, otherwise vulkaninfo and vkcube segfault
dontPatchELF = true;
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils curl gnused jq common-updater-scripts
packagePath="pkgs/by-name/am/amdvlk/package.nix"
function setHash() {
sed -i $packagePath -e 's,sha256 = "[^'"'"'"]*",sha256 = "'"$1"'",'
}
version="$(curl -sL "https://api.github.com/repos/GPUOpen-Drivers/AMDVLK/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
sed -i $packagePath -e 's/version = "[^'"'"'"]*"/version = "'"$version"'"/'
setHash "$(nix-instantiate --eval -A lib.fakeSha256 | xargs echo)"
hash="$(nix to-base64 $(nix-build -A amdvlk 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true))"
setHash "$hash"
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--url"
"https://github.com/GPUOpen-Drivers/AMDVLK"
"--version-regex"
"v-(.*)"
];
};
passthru.impureTests = {
amdvlk = callPackage ./test.nix { };