2021-05-03 20:48:10 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, unstableGitUpdater
|
|
|
|
, 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";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "unstable-2021-09-11";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "punesemu";
|
|
|
|
repo = "puNES";
|
2021-09-18 10:52:07 +00:00
|
|
|
rev = "60ca36fcb066c41d0b3f2b550ca94dc7d12d84d6";
|
|
|
|
sha256 = "JOi6AE1bpAc/wj9fQqHrUNc6vceeUyP0phT2f9kcJTY=";
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
url = "https://github.com/punesemu/puNES.git";
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|