librashader: use finalAttrs & updateScript (#414820)

This commit is contained in:
Yohann Boniface
2025-06-08 00:21:58 +02:00
committed by GitHub
+11 -3
View File
@@ -1,18 +1,19 @@
{
fetchFromGitHub,
lib,
nix-update-script,
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "librashader";
version = "0.6.2";
src = fetchFromGitHub {
owner = "SnowflakePowered";
repo = "librashader";
rev = "librashader-v0.6.2";
tag = "librashader-v${finalAttrs.version}";
hash = "sha256-zkvCpQ5Cq3sDOspc12/gPmNi6hn/nBe1UfWrMGi/o0Q=";
};
@@ -58,6 +59,13 @@ rustPlatform.buildRustPackage {
runHook postInstall
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"librashader-v(.*)"
];
};
meta = {
description = "RetroArch Shaders for All";
homepage = "https://github.com/SnowflakePowered/librashader";
@@ -68,4 +76,4 @@ rustPlatform.buildRustPackage {
maintainers = with lib.maintainers; [ nadiaholmquist ];
platforms = lib.platforms.all;
};
}
})