duckstation: unstable-2023-04-14 -> unstable-2023-09-30

- Add libbacktrace
- Remove mesa
- Circumvent git dependency

+67 -21
+11
pkgs/applications/emulators/duckstation/001-fix-test-inclusion.diff
···
··· 1 + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 2 + index 879d46bc..95570f6b 100644 3 + --- a/src/CMakeLists.txt 4 + +++ b/src/CMakeLists.txt 5 + @@ -20,5 +20,5 @@ if(BUILD_REGTEST) 6 + endif() 7 + 8 + if(BUILD_TESTS) 9 + - add_subdirectory(common-tests EXCLUDE_FROM_ALL) 10 + + add_subdirectory(common-tests) 11 + endif()
+19
pkgs/applications/emulators/duckstation/002-hardcode-vars.diff
···
··· 1 + diff --git a/src/scmversion/gen_scmversion.sh b/src/scmversion/gen_scmversion.sh 2 + index 9c1dacab..d1f895ee 100755 3 + --- a/src/scmversion/gen_scmversion.sh 4 + +++ b/src/scmversion/gen_scmversion.sh 5 + @@ -10,10 +10,10 @@ else 6 + fi 7 + 8 + 9 + -HASH=$(git rev-parse HEAD) 10 + -BRANCH=$(git rev-parse --abbrev-ref HEAD | tr -d '\r\n') 11 + -TAG=$(git describe --tags --dirty --exclude latest --exclude preview --exclude legacy --exclude previous-latest | tr -d '\r\n') 12 + -DATE=$(git log -1 --date=iso8601-strict --format=%cd) 13 + +HASH="@gitHash@" 14 + +BRANCH="@gitBranch@" 15 + +TAG="@gitTag@" 16 + +DATE="@gitDate@" 17 + 18 + cd $CURDIR 19 +
+37 -21
pkgs/applications/emulators/duckstation/default.nix
··· 8 , curl 9 , extra-cmake-modules 10 , libXrandr 11 , makeDesktopItem 12 - , mesa # for libgbm 13 , ninja 14 , pkg-config 15 , qtbase 16 , qtsvg 17 , qttools 18 , qtwayland 19 , vulkan-loader 20 , wayland 21 , wrapQtAppsHook 22 , enableWayland ? true 23 }: 24 25 - stdenv.mkDerivation { 26 pname = "duckstation"; 27 - version = "unstable-2023-04-14"; 28 29 src = fetchFromGitHub { 30 owner = "stenzek"; 31 repo = "duckstation"; 32 - rev = "5fee6f5abee7f3aad65da5523e57896e10e2a53a"; 33 - sha256 = "sha256-sRs/b4GVXhF3zrOef8DSBKJJGYECUER/nNWZAqv7suA="; 34 }; 35 36 nativeBuildInputs = [ 37 cmake 38 copyDesktopItems ··· 49 SDL2 50 curl 51 libXrandr 52 - mesa 53 qtbase 54 qtsvg 55 vulkan-loader ··· 60 ] 61 ++ cubeb.passthru.backendLibs; 62 63 cmakeFlags = [ 64 - "-DUSE_DRMKMS=ON" 65 - ] 66 - ++ lib.optionals enableWayland [ "-DUSE_WAYLAND=ON" ]; 67 68 desktopItems = [ 69 (makeDesktopItem { ··· 79 }) 80 ]; 81 82 installPhase = '' 83 runHook preInstall 84 ··· 92 runHook postInstall 93 ''; 94 95 - doCheck = true; 96 - checkPhase = '' 97 - runHook preCheck 98 - bin/common-tests 99 - runHook postCheck 100 - ''; 101 - 102 qtWrapperArgs = [ 103 "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ vulkan-loader ] ++ cubeb.passthru.backendLibs)}" 104 ]; 105 106 - meta = with lib; { 107 homepage = "https://github.com/stenzek/duckstation"; 108 description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64"; 109 - license = licenses.gpl3Only; 110 mainProgram = "duckstation-qt"; 111 - maintainers = with maintainers; [ guibou AndersonTorres ]; 112 - platforms = platforms.linux; 113 }; 114 - }
··· 8 , curl 9 , extra-cmake-modules 10 , libXrandr 11 + , libbacktrace 12 , makeDesktopItem 13 , ninja 14 , pkg-config 15 , qtbase 16 , qtsvg 17 , qttools 18 , qtwayland 19 + , substituteAll 20 , vulkan-loader 21 , wayland 22 , wrapQtAppsHook 23 , enableWayland ? true 24 }: 25 26 + stdenv.mkDerivation (finalAttrs: { 27 pname = "duckstation"; 28 + version = "unstable-2023-09-30"; 29 30 src = fetchFromGitHub { 31 owner = "stenzek"; 32 repo = "duckstation"; 33 + rev = "d5608bf12df7a7e03750cb94a08a3d7999034ae2"; 34 + hash = "sha256-ktfZgacjkN6GQb1vLmyTZMr8QmmH12qAvFSIBTjgRSs="; 35 }; 36 37 + patches = [ 38 + # Tests are not built by default 39 + ./001-fix-test-inclusion.diff 40 + # Patching yet another script that fills data based on git commands... 41 + (substituteAll { 42 + src = ./002-hardcode-vars.diff; 43 + gitHash = finalAttrs.src.rev; 44 + gitBranch = "master"; 45 + gitTag = "0.1-5889-gd5608bf1"; 46 + gitDate = "2023-09-30T23:20:09+10:00"; 47 + }) 48 + ]; 49 + 50 nativeBuildInputs = [ 51 cmake 52 copyDesktopItems ··· 63 SDL2 64 curl 65 libXrandr 66 + libbacktrace 67 qtbase 68 qtsvg 69 vulkan-loader ··· 74 ] 75 ++ cubeb.passthru.backendLibs; 76 77 + strictDeps = true; 78 + 79 cmakeFlags = [ 80 + (lib.cmakeBool "BUILD_TESTS" true) 81 + (lib.cmakeBool "ENABLE_WAYLAND" enableWayland) 82 + ]; 83 84 desktopItems = [ 85 (makeDesktopItem { ··· 95 }) 96 ]; 97 98 + doCheck = true; 99 + checkPhase = '' 100 + runHook preCheck 101 + bin/common-tests 102 + runHook postCheck 103 + ''; 104 + 105 installPhase = '' 106 runHook preInstall 107 ··· 115 runHook postInstall 116 ''; 117 118 qtWrapperArgs = [ 119 "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ vulkan-loader ] ++ cubeb.passthru.backendLibs)}" 120 ]; 121 122 + meta = { 123 homepage = "https://github.com/stenzek/duckstation"; 124 description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64"; 125 + license = lib.licenses.gpl3Only; 126 mainProgram = "duckstation-qt"; 127 + maintainers = with lib.maintainers; [ guibou AndersonTorres ]; 128 + platforms = lib.platforms.linux; 129 }; 130 + })