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

65 lines
1.4 KiB
Nix
Raw Normal View History

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