2021-05-03 20:48:10 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2022-01-07 04:07:37 +00:00
|
|
|
, fetchpatch
|
|
|
|
, nix-update-script
|
2021-05-03 20:48:10 +00:00
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, autoreconfHook
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, ffmpeg
|
|
|
|
, libGLU
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2021-07-24 12:14:16 +00:00
|
|
|
, libX11
|
|
|
|
, libXrandr
|
2021-05-03 20:48:10 +00:00
|
|
|
, sndio
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "punes";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "0.109";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "punesemu";
|
|
|
|
repo = "puNES";
|
2022-01-07 04:07:37 +00:00
|
|
|
rev = "v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-6aRtR/d8nhzmpN9QKSZ62jye7qjfO+FpRMCXkX4Yubk=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ]
|
2021-07-24 12:14:16 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libX11 libXrandr ]
|
2021-05-03 20:48:10 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isBSD [ sndio ];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--prefix=${placeholder "out"}"
|
|
|
|
"--without-opengl-nvidia-cg"
|
|
|
|
"--with-ffmpeg"
|
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";
|
2021-05-03 20:48:10 +00:00
|
|
|
homepage = "https://github.com/punesemu/puNES";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = with platforms; linux ++ freebsd ++ openbsd ++ windows;
|
|
|
|
};
|
|
|
|
}
|