nixpkgs/pkgs/applications/emulators/punes/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv
2021-04-26 15:14:57 +00:00
, lib
, fetchFromGitHub
2022-01-04 04:14:19 +00:00
, fetchpatch
, gitUpdater
2021-04-26 15:14:57 +00:00
, cmake
, pkg-config
, ffmpeg
, libGLU
, alsa-lib
, libX11
, libXrandr
2021-04-26 15:14:57 +00:00
, sndio
, qtbase
, qtsvg
, qttools
, wrapQtAppsHook
2021-04-26 15:14:57 +00:00
}:
stdenv.mkDerivation rec {
2021-04-26 15:14:57 +00:00
pname = "punes";
version = "0.110";
2021-04-26 15:14:57 +00:00
src = fetchFromGitHub {
owner = "punesemu";
repo = "puNES";
2022-01-04 04:14:19 +00:00
rev = "v${version}";
sha256 = "sha256-+hL168r40aYUjyLbWFXWk9G2srrrG1TH1gLYMliHftU=";
2021-04-26 15:14:57 +00:00
};
patches = [
# Fixes compilation on aarch64
# Remove when version > 0.110
(fetchpatch {
url = "https://github.com/punesemu/puNES/commit/90dd5bc90412bbd199c2716f67a24aa88b24d80f.patch";
hash = "sha256-/KNpTds4qjwyaTUebWWPlVXfuxVh6M4zOInxUfYztJg=";
})
];
2021-04-26 15:14:57 +00:00
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
];
2021-04-26 15:14:57 +00:00
buildInputs = [
ffmpeg
libGLU
qtbase
qtsvg
] ++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libX11
libXrandr
] ++ lib.optionals stdenv.hostPlatform.isBSD [
sndio
];
2021-04-26 15:14:57 +00:00
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"}"
2021-04-26 15:14:57 +00:00
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
2021-04-26 15:14:57 +00:00
meta = with lib; {
2021-09-17 12:38:22 +00:00
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";
2021-04-26 15:14:57 +00:00
homepage = "https://github.com/punesemu/puNES";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ OPNA2608 ];
platforms = with platforms; linux ++ freebsd ++ openbsd ++ windows;
};
}