librashader: use finalAttrs & updateScript (#414820)

authored by Yohann Boniface and committed by GitHub 9fa611dc a65cc51f

+11 -3
+11 -3
pkgs/by-name/li/librashader/package.nix
··· 1 1 { 2 2 fetchFromGitHub, 3 3 lib, 4 + nix-update-script, 4 5 rustPlatform, 5 6 stdenv, 6 7 }: 7 8 8 - rustPlatform.buildRustPackage { 9 + rustPlatform.buildRustPackage (finalAttrs: { 9 10 pname = "librashader"; 10 11 version = "0.6.2"; 11 12 12 13 src = fetchFromGitHub { 13 14 owner = "SnowflakePowered"; 14 15 repo = "librashader"; 15 - rev = "librashader-v0.6.2"; 16 + tag = "librashader-v${finalAttrs.version}"; 16 17 hash = "sha256-zkvCpQ5Cq3sDOspc12/gPmNi6hn/nBe1UfWrMGi/o0Q="; 17 18 }; 18 19 ··· 58 59 runHook postInstall 59 60 ''; 60 61 62 + passthru.updateScript = nix-update-script { 63 + extraArgs = [ 64 + "--version-regex" 65 + "librashader-v(.*)" 66 + ]; 67 + }; 68 + 61 69 meta = { 62 70 description = "RetroArch Shaders for All"; 63 71 homepage = "https://github.com/SnowflakePowered/librashader"; ··· 68 76 maintainers = with lib.maintainers; [ nadiaholmquist ]; 69 77 platforms = lib.platforms.all; 70 78 }; 71 - } 79 + })