punes: 0.109 -> 0.110, add Qt6 variant (#209485)

This commit is contained in:
Christoph Neidahl 2023-01-31 20:59:19 +01:00 committed by GitHub
parent 59e9ca3ae6
commit 6e1b43747a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 30 deletions

View file

@ -1,13 +1,8 @@
{ mkDerivation
, stdenv
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, nix-update-script
, qtbase
, qtsvg
, qttools
, autoreconfHook
, gitUpdater
, cmake
, pkg-config
, ffmpeg
@ -16,41 +11,63 @@
, libX11
, libXrandr
, sndio
, qtbase
, qtsvg
, qttools
, wrapQtAppsHook
}:
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "punes";
version = "0.109";
version = "0.110";
src = fetchFromGitHub {
owner = "punesemu";
repo = "puNES";
rev = "v${version}";
sha256 = "sha256-6aRtR/d8nhzmpN9QKSZ62jye7qjfO+FpRMCXkX4Yubk=";
sha256 = "sha256-+hL168r40aYUjyLbWFXWk9G2srrrG1TH1gLYMliHftU=";
};
postPatch = ''
substituteInPlace configure.ac \
--replace '`$PKG_CONFIG --variable=host_bins Qt5Core`/lrelease' '${qttools.dev}/bin/lrelease'
'';
nativeBuildInputs = [ autoreconfHook cmake pkg-config qttools ];
buildInputs = [ ffmpeg qtbase qtsvg libGLU ]
++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libX11 libXrandr ]
++ lib.optionals stdenv.hostPlatform.isBSD [ sndio ];
dontUseCmakeConfigure = true;
enableParallelBuilding = true;
configureFlags = [
"--prefix=${placeholder "out"}"
"--without-opengl-nvidia-cg"
"--with-ffmpeg"
patches = [
# Fixes compilation on aarch64
# Remove when version > 0.110
(fetchpatch {
url = "https://github.com/punesemu/puNES/commit/90dd5bc90412bbd199c2716f67a24aa88b24d80f.patch";
hash = "sha256-/KNpTds4qjwyaTUebWWPlVXfuxVh6M4zOInxUfYztJg=";
})
];
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
];
buildInputs = [
ffmpeg
libGLU
qtbase
qtsvg
] ++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libX11
libXrandr
] ++ lib.optionals stdenv.hostPlatform.isBSD [
sndio
];
cmakeFlags = [
"-DENABLE_GIT_INFO=OFF"
"-DENABLE_RELEASE=ON"
"-DENABLE_FFMPEG=ON"
"-DENABLE_OPENGL=ON"
"-DENABLE_QT6_LIBS=${if lib.versionAtLeast qtbase.version "6.0" then "ON" else "OFF"}"
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";

View file

@ -2189,6 +2189,8 @@ with pkgs;
punes = libsForQt5.callPackage ../applications/emulators/punes { };
punes-qt6 = qt6Packages.callPackage ../applications/emulators/punes { };
py65 = python3Packages.callPackage ../applications/emulators/py65 { };
resim = callPackage ../applications/emulators/resim {};