amdvlk: move to pkgs/by-name

This commit is contained in:
John Titor 2024-08-17 22:46:22 +05:30
parent 71de7c7e2b
commit a72194fa1a
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0
3 changed files with 4 additions and 4 deletions

View File

@ -106,12 +106,14 @@ stdenv.mkDerivation (finalAttrs: {
#!/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 "pkgs/development/libraries/amdvlk/default.nix" -e 's,sha256 = "[^'"'"'"]*",sha256 = "'"$1"'",'
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 "pkgs/development/libraries/amdvlk/default.nix" -e 's/version = "[^'"'"'"]*"/version = "'"$version"'"/'
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))"

View File

@ -19431,8 +19431,6 @@ with pkgs;
allegro4 = callPackage ../development/libraries/allegro { };
allegro5 = callPackage ../development/libraries/allegro/5.nix { };
amdvlk = callPackage ../development/libraries/amdvlk { };
amf-headers = callPackage ../development/libraries/amf-headers { };
aml = callPackage ../development/libraries/aml { };