From bb94de58919f7a80a12e814c20459b972e78a139 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Tue, 4 Jan 2022 05:14:19 +0100 Subject: [PATCH] punes: unstable-2021-09-11 -> 0.108 --- pkgs/misc/emulators/punes/default.nix | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/emulators/punes/default.nix b/pkgs/misc/emulators/punes/default.nix index 860e90d23c33..9b147de4fa93 100644 --- a/pkgs/misc/emulators/punes/default.nix +++ b/pkgs/misc/emulators/punes/default.nix @@ -2,7 +2,8 @@ , stdenv , lib , fetchFromGitHub -, unstableGitUpdater +, fetchpatch +, nix-update-script , qtbase , qtsvg , qttools @@ -19,15 +20,25 @@ mkDerivation rec { pname = "punes"; - version = "unstable-2021-09-11"; + version = "0.108"; src = fetchFromGitHub { owner = "punesemu"; repo = "puNES"; - rev = "60ca36fcb066c41d0b3f2b550ca94dc7d12d84d6"; - sha256 = "JOi6AE1bpAc/wj9fQqHrUNc6vceeUyP0phT2f9kcJTY="; + rev = "v${version}"; + sha256 = "0inkwmvbr2w4addmgk9r4f13yismang9ylfgflhh9352lf0lirv8"; }; + patches = [ + # Drop when version > 0.108 + # https://github.com/punesemu/puNES/issues/185 + (fetchpatch { + name = "0001-punes-Fixed-make-install.patch"; + url = "https://github.com/punesemu/puNES/commit/902434f50398ebcda0786ade4b28a0496084810e.patch"; + sha256 = "1a3052n3n1qipi4bd7f7gq4zl5jjjzzzpbijdisis2vxvhnfvcim"; + }) + ]; + postPatch = '' substituteInPlace configure.ac \ --replace '`$PKG_CONFIG --variable=host_bins Qt5Core`/lrelease' '${qttools.dev}/bin/lrelease' @@ -49,8 +60,8 @@ mkDerivation rec { "--with-ffmpeg" ]; - passthru.updateScript = unstableGitUpdater { - url = "https://github.com/punesemu/puNES.git"; + passthru.updateScript = nix-update-script { + attrPath = pname; }; meta = with lib; {