From 7c2bf912e9569409cbfc42ee9f545ff8351546f7 Mon Sep 17 00:00:00 2001 From: Ludovico Piero Date: Fri, 29 Aug 2025 21:20:21 +0900 Subject: [PATCH] samrewritten: 202008-unstable-2025-03-11 -> 20250802.1 Signed-off-by: Ludovico Piero --- pkgs/by-name/sa/samrewritten/package.nix | 61 +++++++++++++----------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/pkgs/by-name/sa/samrewritten/package.nix b/pkgs/by-name/sa/samrewritten/package.nix index ebec8ce6973c..34b345da0454 100644 --- a/pkgs/by-name/sa/samrewritten/package.nix +++ b/pkgs/by-name/sa/samrewritten/package.nix @@ -1,52 +1,59 @@ { lib, - stdenv, + rustPlatform, fetchFromGitHub, - unstableGitUpdater, - curl, - gtkmm3, - glibmm, - gnutls, - yajl, + nix-update-script, + + # Deps + gdk-pixbuf, + glib, + graphene, + gtk4, + openssl, + pango, pkg-config, + wrapGAppsHook4, }: -stdenv.mkDerivation (finalAttrs: { +rustPlatform.buildRustPackage (finalAttrs: { pname = "samrewritten"; - version = "202008-unstable-2025-03-11"; + version = "20250802.1"; src = fetchFromGitHub { owner = "PaulCombal"; repo = "SamRewritten"; - # The latest release is too old, use latest commit instead - rev = "cac0291f3e4465135f5cf7d5b99fdb005fb23ade"; - hash = "sha256-+f/j2q1lJ3yp3/BBgnK9kS4P3ULQ5onQPAcUV12LYnI="; + tag = finalAttrs.version; + hash = "sha256-41fBafFmYW8uGICpIJtSnXDP+KV3uVInxm0op40V/tc="; }; - makeFlags = [ "PREFIX=$(out)" ]; + cargoHash = "sha256-Px/TlR3BhiFCv73v06VNq0/W0bQM/ORRE/9ndv5hbpY="; - nativeBuildInputs = [ pkg-config ]; + # Tests require network access and a running Steam client. Skipping. + doCheck = false; - buildInputs = [ - curl - gtkmm3 - glibmm - gnutls - yajl + nativeBuildInputs = [ + pkg-config + wrapGAppsHook4 ]; - postInstall = '' - substituteInPlace $out/share/applications/samrewritten.desktop \ - --replace-fail "Exec=/usr/bin/samrewritten" "Exec=samrewritten" - ''; + buildInputs = [ + gdk-pixbuf + glib + graphene + gtk4 + openssl + pango + ]; - passthru.updateScript = unstableGitUpdater { }; + PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig"; + + passthru.updateScript = nix-update-script { }; meta = { - description = "Steam Achievement Manager For Linux. Rewritten in C++"; + description = "Modern Steam achievements manager for Windows and Linux"; mainProgram = "samrewritten"; homepage = "https://github.com/PaulCombal/SamRewritten"; changelog = "https://github.com/PaulCombal/SamRewritten/releases"; - license = lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ ludovicopiero ]; platforms = [ "x86_64-linux" ]; };