mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
Merge pull request #155697 from Flakebi/amdvlk
This commit is contained in:
commit
5a5cb4db9e
|
@ -22,13 +22,13 @@ let
|
|||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "amdvlk";
|
||||
version = "2021.Q4.3";
|
||||
version = "2022.Q1.1";
|
||||
|
||||
src = fetchRepoProject {
|
||||
name = "${pname}-src";
|
||||
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
|
||||
rev = "refs/tags/v-${version}";
|
||||
sha256 = "M+58gJjP33yOuq6RYN73HG7wACPaYRz7WFC/AFFGMzw=";
|
||||
sha256 = "jdAFIC2JYPqCADx/73KM6E3rLFWF4SlEdY9lCK1NOhU=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -87,11 +87,11 @@ in stdenv.mkDerivation rec {
|
|||
#!nix-shell -i bash -p coreutils curl gnused jq common-updater-scripts
|
||||
|
||||
function setHash() {
|
||||
sed -i "pkgs/development/libraries/amdvlk/default.nix" -e 's,sha256 = "[^.'"'"']*",sha256 = "'"$1"'",'
|
||||
sed -i "pkgs/development/libraries/amdvlk/default.nix" -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 "pkgs/development/libraries/amdvlk/default.nix" -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))"
|
||||
|
|
Loading…
Reference in a new issue