duckstation: unstable-2023-09-30 -> 0.1-6283
This commit is contained in:
@@ -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-6283";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "duckstation";
|
||||
rev = "d5608bf12df7a7e03750cb94a08a3d7999034ae2";
|
||||
hash = "sha256-ktfZgacjkN6GQb1vLmyTZMr8QmmH12qAvFSIBTjgRSs=";
|
||||
rev = "1d751d33f1fce0f0d2b9e00b3a4fb4ec76e77f8f";
|
||||
hash = "sha256-nrdsywg1Sn/YPLaidquePX45+3AxncxTxm+sGDDhL2c=";
|
||||
};
|
||||
|
||||
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}-g1d751d33";
|
||||
gitDate = "2024-01-08T15:49:05+10: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";
|
||||
|
||||
Reference in New Issue
Block a user