Merge pull request #277565 from SuperSamus/duckstation-update

duckstation: unstable-2023-09-30 -> 0.1-6292
This commit is contained in:
Peder Bergebakken Sundt
2024-02-18 19:56:17 +01:00
committed by GitHub
2 changed files with 27 additions and 34 deletions
@@ -1,5 +1,5 @@
diff --git a/src/scmversion/gen_scmversion.sh b/src/scmversion/gen_scmversion.sh
index 9c1dacab..d1f895ee 100755
index 9122cd8..50ed8f9 100755
--- a/src/scmversion/gen_scmversion.sh
+++ b/src/scmversion/gen_scmversion.sh
@@ -10,10 +10,10 @@ else
@@ -8,7 +8,7 @@ index 9c1dacab..d1f895ee 100755
-HASH=$(git rev-parse HEAD)
-BRANCH=$(git rev-parse --abbrev-ref HEAD | tr -d '\r\n')
-TAG=$(git describe --tags --dirty --exclude latest --exclude preview --exclude legacy --exclude previous-latest | tr -d '\r\n')
-TAG=$(git describe --dirty | tr -d '\r\n')
-DATE=$(git log -1 --date=iso8601-strict --format=%cd)
+HASH="@gitHash@"
+BRANCH="@gitBranch@"
@@ -9,7 +9,7 @@
, extra-cmake-modules
, libXrandr
, libbacktrace
, makeDesktopItem
, makeWrapper
, ninja
, pkg-config
, qtbase
@@ -20,18 +20,17 @@
, vulkan-loader
, wayland
, wrapQtAppsHook
, enableWayland ? true
}:
stdenv.mkDerivation (finalAttrs: {
pname = "duckstation";
version = "unstable-2023-09-30";
version = "0.1-6292";
src = fetchFromGitHub {
owner = "stenzek";
repo = "duckstation";
rev = "d5608bf12df7a7e03750cb94a08a3d7999034ae2";
hash = "sha256-ktfZgacjkN6GQb1vLmyTZMr8QmmH12qAvFSIBTjgRSs=";
rev = "0bc42c38aab49030118f507c9783de047769148b";
hash = "sha256-8OavixSwEWihFY2fEdsepR1lqWlTH+//xZRKwb7lFCQ=";
};
patches = [
@@ -42,21 +41,19 @@ stdenv.mkDerivation (finalAttrs: {
src = ./002-hardcode-vars.diff;
gitHash = finalAttrs.src.rev;
gitBranch = "master";
gitTag = "0.1-5889-gd5608bf1";
gitDate = "2023-09-30T23:20:09+10:00";
gitTag = "${finalAttrs.version}-g0bc42c38";
gitDate = "2024-02-06T22:47:47+09:00";
})
];
nativeBuildInputs = [
cmake
copyDesktopItems
extra-cmake-modules
ninja
pkg-config
qttools
wrapQtAppsHook
]
++ lib.optionals enableWayland [
extra-cmake-modules
];
buildInputs = [
@@ -66,9 +63,6 @@ stdenv.mkDerivation (finalAttrs: {
libbacktrace
qtbase
qtsvg
vulkan-loader
]
++ lib.optionals enableWayland [
qtwayland
wayland
]
@@ -78,21 +72,6 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTS" true)
(lib.cmakeBool "ENABLE_WAYLAND" enableWayland)
];
desktopItems = [
(makeDesktopItem {
name = "duckstation-qt";
desktopName = "DuckStation";
genericName = "PlayStation 1 Emulator";
icon = "duckstation";
tryExec = "duckstation-qt";
exec = "duckstation-qt %f";
comment = "Fast PlayStation 1 emulator";
categories = [ "Game" "Emulator" "Qt" ];
type = "Application";
})
];
doCheck = true;
@@ -110,14 +89,28 @@ stdenv.mkDerivation (finalAttrs: {
cp -r bin $out/share/duckstation
ln -s $out/share/duckstation/duckstation-qt $out/bin/
install -Dm644 bin/resources/images/duck.png $out/share/pixmaps/duckstation.png
install -Dm644 $src/scripts/org.duckstation.DuckStation.desktop $out/share/applications/org.duckstation.DuckStation.desktop
install -Dm644 $src/scripts/org.duckstation.DuckStation.png $out/share/pixmaps/org.duckstation.DuckStation.png
runHook postInstall
'';
qtWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ vulkan-loader ] ++ cubeb.passthru.backendLibs)}"
];
qtWrapperArgs =
let
libPath = lib.makeLibraryPath ([
vulkan-loader
] ++ cubeb.passthru.backendLibs);
in [
"--prefix LD_LIBRARY_PATH : ${libPath}"
];
# https://github.com/stenzek/duckstation/blob/master/scripts/appimage/apprun-hooks/default-to-x11.sh
# Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run
postFixup = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/duckstation-qt \
--run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi'
'';
meta = {
homepage = "https://github.com/stenzek/duckstation";