You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.3 KiB
107 lines
2.3 KiB
3 years ago
|
{ lib
|
||
|
, mkDerivation
|
||
|
, fetchFromGitHub
|
||
3 years ago
|
, SDL2
|
||
3 years ago
|
, cmake
|
||
3 years ago
|
, curl
|
||
3 years ago
|
, extra-cmake-modules
|
||
|
, gtk3
|
||
|
, libevdev
|
||
|
, libpulseaudio
|
||
|
, mesa
|
||
3 years ago
|
, ninja
|
||
|
, pkg-config
|
||
|
, qtbase
|
||
|
, qttools
|
||
|
, sndio
|
||
3 years ago
|
, vulkan-loader
|
||
|
, wayland
|
||
3 years ago
|
, wrapQtAppsHook
|
||
3 years ago
|
}:
|
||
3 years ago
|
|
||
4 years ago
|
mkDerivation rec {
|
||
|
pname = "duckstation";
|
||
2 years ago
|
version = "0.pre+date=2022-01-18";
|
||
4 years ago
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "stenzek";
|
||
|
repo = pname;
|
||
2 years ago
|
rev = "51041e47f70123eda41d999701f5651830a0a95e";
|
||
|
sha256 = "sha256-nlF6ctDU8KCK7MN2pniPLLqUbPUygX9rl0hjzVQ+mPo=";
|
||
4 years ago
|
};
|
||
|
|
||
3 years ago
|
nativeBuildInputs = [
|
||
|
cmake
|
||
|
extra-cmake-modules
|
||
|
ninja
|
||
|
pkg-config
|
||
|
qttools
|
||
|
wrapQtAppsHook
|
||
|
];
|
||
4 years ago
|
|
||
3 years ago
|
buildInputs = [
|
||
|
SDL2
|
||
3 years ago
|
curl
|
||
3 years ago
|
gtk3
|
||
|
libevdev
|
||
|
libpulseaudio
|
||
3 years ago
|
mesa
|
||
|
qtbase
|
||
|
sndio
|
||
3 years ago
|
vulkan-loader
|
||
3 years ago
|
wayland
|
||
3 years ago
|
];
|
||
|
|
||
|
cmakeFlags = [
|
||
3 years ago
|
"-DUSE_DRMKMS=ON"
|
||
3 years ago
|
"-DUSE_WAYLAND=ON"
|
||
3 years ago
|
];
|
||
|
|
||
|
postPatch = ''
|
||
|
substituteInPlace extras/linux-desktop-files/duckstation-qt.desktop \
|
||
|
--replace "duckstation-qt" "duckstation" \
|
||
|
--replace "TryExec=duckstation" "tryExec=duckstation-qt" \
|
||
|
--replace "Exec=duckstation" "Exec=duckstation-qt"
|
||
|
substituteInPlace extras/linux-desktop-files/duckstation-nogui.desktop \
|
||
|
--replace "duckstation-nogui" "duckstation" \
|
||
|
--replace "TryExec=duckstation" "tryExec=duckstation-nogui" \
|
||
|
--replace "Exec=duckstation" "Exec=duckstation-nogui"
|
||
|
'';
|
||
4 years ago
|
|
||
|
installPhase = ''
|
||
3 years ago
|
runHook preInstall
|
||
3 years ago
|
|
||
3 years ago
|
mkdir -p $out/bin $out/share $out/share/pixmaps $out/share/applications
|
||
|
rm bin/common-tests
|
||
|
|
||
|
cp -r bin $out/share/duckstation
|
||
|
ln -s $out/share/duckstation/duckstation-{qt,nogui} $out/bin/
|
||
|
|
||
|
cp ../extras/icons/icon-256px.png $out/share/pixmaps/duckstation.png
|
||
|
cp ../extras/linux-desktop-files/* $out/share/applications/
|
||
3 years ago
|
|
||
3 years ago
|
runHook postInstall
|
||
|
'';
|
||
|
|
||
|
doCheck = true;
|
||
|
checkPhase = ''
|
||
|
runHook preCheck
|
||
|
./bin/common-tests
|
||
|
runHook postCheck
|
||
4 years ago
|
'';
|
||
|
|
||
3 years ago
|
qtWrapperArgs = [
|
||
|
"--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib"
|
||
|
];
|
||
|
|
||
4 years ago
|
meta = with lib; {
|
||
|
homepage = "https://github.com/stenzek/duckstation";
|
||
3 years ago
|
description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64";
|
||
3 years ago
|
license = licenses.gpl3Only;
|
||
3 years ago
|
maintainers = with maintainers; [ guibou AndersonTorres ];
|
||
4 years ago
|
platforms = platforms.linux;
|
||
|
};
|
||
|
}
|
||
3 years ago
|
# TODO: default sound backend (cubeb) does not work, but SDL does. Strangely,
|
||
|
# switching to cubeb while a game is running makes it work.
|