Merge pull request #309064 from atorres1985-contrib/duckstation

duckstation: 0.1-6292 -> 0.1-6658
This commit is contained in:
éclairevoyant 2024-05-29 06:59:53 +00:00 committed by GitHub
commit f5e912ce8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 47 additions and 15 deletions

View File

@ -2,34 +2,42 @@
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, SDL2 , SDL2
, callPackage
, cmake , cmake
, cubeb , cubeb
, curl , curl
, extra-cmake-modules , extra-cmake-modules
, libXrandr , libXrandr
, libbacktrace , libbacktrace
, libwebp
, makeWrapper , makeWrapper
, ninja , ninja
, pkg-config , pkg-config
, qtbase , qt6
, qtsvg
, qttools
, qtwayland
, substituteAll , substituteAll
, vulkan-loader , vulkan-loader
, wayland , wayland
, wrapQtAppsHook
}: }:
let
shaderc-patched = callPackage ./shaderc-patched.nix { };
inherit (qt6)
qtbase
qtsvg
qttools
qtwayland
wrapQtAppsHook
;
in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "duckstation"; pname = "duckstation";
version = "0.1-6292"; version = "0.1-6658";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "stenzek"; owner = "stenzek";
repo = "duckstation"; repo = "duckstation";
rev = "0bc42c38aab49030118f507c9783de047769148b"; rev = "4e0c417add264226b3db065c1466791f0591a1b5";
hash = "sha256-8OavixSwEWihFY2fEdsepR1lqWlTH+//xZRKwb7lFCQ="; hash = "sha256-fN0bcjqjMmK3qVLlrYmR2VgjK0BjdK4nUj8vNYdFC3I=";
}; };
patches = [ patches = [
@ -40,8 +48,8 @@ stdenv.mkDerivation (finalAttrs: {
src = ./002-hardcode-vars.diff; src = ./002-hardcode-vars.diff;
gitHash = finalAttrs.src.rev; gitHash = finalAttrs.src.rev;
gitBranch = "master"; gitBranch = "master";
gitTag = "${finalAttrs.version}-g0bc42c38"; gitTag = "${finalAttrs.version}-g4e0c417a";
gitDate = "2024-02-06T22:47:47+09:00"; gitDate = "2024-04-16T12:49:54+10:00";
}) })
]; ];
@ -59,9 +67,11 @@ stdenv.mkDerivation (finalAttrs: {
curl curl
libXrandr libXrandr
libbacktrace libbacktrace
libwebp
qtbase qtbase
qtsvg qtsvg
qtwayland qtwayland
shaderc-patched
wayland wayland
] ]
++ cubeb.passthru.backendLibs; ++ cubeb.passthru.backendLibs;
@ -72,10 +82,13 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "BUILD_TESTS" true) (lib.cmakeBool "BUILD_TESTS" true)
]; ];
doCheck = true; doInstallCheck = true;
checkPhase = ''
installCheckPhase = ''
runHook preCheck runHook preCheck
bin/common-tests
$out/share/duckstation/common-tests
runHook postCheck runHook postCheck
''; '';

View File

@ -0,0 +1,21 @@
{
lib,
fetchpatch,
duckstation,
shaderc,
}:
shaderc.overrideAttrs (old: {
pname = "shaderc-patched-for-duckstation";
patches = (old.patches or [ ]) ++ [
(fetchpatch {
url = "file://${duckstation.src}/scripts/shaderc-changes.patch";
hash = "sha256-Ps/D+CdSbjVWg3ZGOEcgbpQbCNkI5Nuizm4E5qiM9Wo=";
excludes = [
"CHANGES"
"CMakeLists.txt"
"libshaderc/CMakeLists.txt"
];
})
];
})

View File

@ -2632,8 +2632,6 @@ with pkgs;
inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa; inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa;
}; };
duckstation = qt6Packages.callPackage ../applications/emulators/duckstation { };
dynamips = callPackage ../applications/emulators/dynamips { }; dynamips = callPackage ../applications/emulators/dynamips { };
emu2 = callPackage ../applications/emulators/emu2 { }; emu2 = callPackage ../applications/emulators/emu2 { };