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

authored by

Christoph Neidahl and committed by
GitHub
6e1b4374 59e9ca3a

+46 -27
+44 -27
pkgs/applications/emulators/punes/default.nix
··· 1 - { mkDerivation 2 - , stdenv 1 + { stdenv 3 2 , lib 4 3 , fetchFromGitHub 5 4 , fetchpatch 6 - , nix-update-script 7 - , qtbase 8 - , qtsvg 9 - , qttools 10 - , autoreconfHook 5 + , gitUpdater 11 6 , cmake 12 7 , pkg-config 13 8 , ffmpeg ··· 16 11 , libX11 17 12 , libXrandr 18 13 , sndio 14 + , qtbase 15 + , qtsvg 16 + , qttools 17 + , wrapQtAppsHook 19 18 }: 20 19 21 - mkDerivation rec { 20 + stdenv.mkDerivation rec { 22 21 pname = "punes"; 23 - version = "0.109"; 22 + version = "0.110"; 24 23 25 24 src = fetchFromGitHub { 26 25 owner = "punesemu"; 27 26 repo = "puNES"; 28 27 rev = "v${version}"; 29 - sha256 = "sha256-6aRtR/d8nhzmpN9QKSZ62jye7qjfO+FpRMCXkX4Yubk="; 28 + sha256 = "sha256-+hL168r40aYUjyLbWFXWk9G2srrrG1TH1gLYMliHftU="; 30 29 }; 31 30 32 - postPatch = '' 33 - substituteInPlace configure.ac \ 34 - --replace '`$PKG_CONFIG --variable=host_bins Qt5Core`/lrelease' '${qttools.dev}/bin/lrelease' 35 - ''; 31 + patches = [ 32 + # Fixes compilation on aarch64 33 + # Remove when version > 0.110 34 + (fetchpatch { 35 + url = "https://github.com/punesemu/puNES/commit/90dd5bc90412bbd199c2716f67a24aa88b24d80f.patch"; 36 + hash = "sha256-/KNpTds4qjwyaTUebWWPlVXfuxVh6M4zOInxUfYztJg="; 37 + }) 38 + ]; 36 39 37 - nativeBuildInputs = [ autoreconfHook cmake pkg-config qttools ]; 40 + nativeBuildInputs = [ 41 + cmake 42 + pkg-config 43 + qttools 44 + wrapQtAppsHook 45 + ]; 38 46 39 - buildInputs = [ ffmpeg qtbase qtsvg libGLU ] 40 - ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libX11 libXrandr ] 41 - ++ lib.optionals stdenv.hostPlatform.isBSD [ sndio ]; 47 + buildInputs = [ 48 + ffmpeg 49 + libGLU 50 + qtbase 51 + qtsvg 52 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ 53 + alsa-lib 54 + libX11 55 + libXrandr 56 + ] ++ lib.optionals stdenv.hostPlatform.isBSD [ 57 + sndio 58 + ]; 42 59 43 - dontUseCmakeConfigure = true; 44 - 45 - enableParallelBuilding = true; 46 - 47 - configureFlags = [ 48 - "--prefix=${placeholder "out"}" 49 - "--without-opengl-nvidia-cg" 50 - "--with-ffmpeg" 60 + cmakeFlags = [ 61 + "-DENABLE_GIT_INFO=OFF" 62 + "-DENABLE_RELEASE=ON" 63 + "-DENABLE_FFMPEG=ON" 64 + "-DENABLE_OPENGL=ON" 65 + "-DENABLE_QT6_LIBS=${if lib.versionAtLeast qtbase.version "6.0" then "ON" else "OFF"}" 51 66 ]; 52 67 53 - passthru.updateScript = nix-update-script { }; 68 + passthru.updateScript = gitUpdater { 69 + rev-prefix = "v"; 70 + }; 54 71 55 72 meta = with lib; { 56 73 description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";
+2
pkgs/top-level/all-packages.nix
··· 2189 2189 2190 2190 punes = libsForQt5.callPackage ../applications/emulators/punes { }; 2191 2191 2192 + punes-qt6 = qt6Packages.callPackage ../applications/emulators/punes { }; 2193 + 2192 2194 py65 = python3Packages.callPackage ../applications/emulators/py65 { }; 2193 2195 2194 2196 resim = callPackage ../applications/emulators/resim {};