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 , lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, nix-update-script , gitUpdater
, qtbase
, qtsvg
, qttools
, autoreconfHook
, cmake , cmake
, pkg-config , pkg-config
, ffmpeg , ffmpeg
@ -16,41 +11,63 @@
, libX11 , libX11
, libXrandr , libXrandr
, sndio , sndio
, qtbase
, qtsvg
, qttools
, wrapQtAppsHook
}: }:
mkDerivation rec { stdenv.mkDerivation rec {
pname = "punes"; pname = "punes";
version = "0.109"; version = "0.110";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "punesemu"; owner = "punesemu";
repo = "puNES"; repo = "puNES";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-6aRtR/d8nhzmpN9QKSZ62jye7qjfO+FpRMCXkX4Yubk="; sha256 = "sha256-+hL168r40aYUjyLbWFXWk9G2srrrG1TH1gLYMliHftU=";
}; };
postPatch = '' patches = [
substituteInPlace configure.ac \ # Fixes compilation on aarch64
--replace '`$PKG_CONFIG --variable=host_bins Qt5Core`/lrelease' '${qttools.dev}/bin/lrelease' # Remove when version > 0.110
''; (fetchpatch {
url = "https://github.com/punesemu/puNES/commit/90dd5bc90412bbd199c2716f67a24aa88b24d80f.patch";
nativeBuildInputs = [ autoreconfHook cmake pkg-config qttools ]; hash = "sha256-/KNpTds4qjwyaTUebWWPlVXfuxVh6M4zOInxUfYztJg=";
})
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"
]; ];
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; { meta = with lib; {
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player"; 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 = libsForQt5.callPackage ../applications/emulators/punes { };
punes-qt6 = qt6Packages.callPackage ../applications/emulators/punes { };
py65 = python3Packages.callPackage ../applications/emulators/py65 { }; py65 = python3Packages.callPackage ../applications/emulators/py65 { };
resim = callPackage ../applications/emulators/resim {}; resim = callPackage ../applications/emulators/resim {};