diff --git a/pkgs/applications/emulators/duckstation/001-fix-test-inclusion.diff b/pkgs/by-name/du/duckstation/001-fix-test-inclusion.diff similarity index 100% rename from pkgs/applications/emulators/duckstation/001-fix-test-inclusion.diff rename to pkgs/by-name/du/duckstation/001-fix-test-inclusion.diff diff --git a/pkgs/applications/emulators/duckstation/002-hardcode-vars.diff b/pkgs/by-name/du/duckstation/002-hardcode-vars.diff similarity index 100% rename from pkgs/applications/emulators/duckstation/002-hardcode-vars.diff rename to pkgs/by-name/du/duckstation/002-hardcode-vars.diff diff --git a/pkgs/applications/emulators/duckstation/default.nix b/pkgs/by-name/du/duckstation/package.nix similarity index 81% rename from pkgs/applications/emulators/duckstation/default.nix rename to pkgs/by-name/du/duckstation/package.nix index 91d2b23705ad7..37d2d01534b1a 100644 --- a/pkgs/applications/emulators/duckstation/default.nix +++ b/pkgs/by-name/du/duckstation/package.nix @@ -2,34 +2,42 @@ , stdenv , fetchFromGitHub , SDL2 +, callPackage , cmake , cubeb , curl , extra-cmake-modules , libXrandr , libbacktrace +, libwebp , makeWrapper , ninja , pkg-config -, qtbase -, qtsvg -, qttools -, qtwayland +, qt6 , substituteAll , vulkan-loader , wayland -, wrapQtAppsHook }: +let + shaderc-patched = callPackage ./shaderc-patched.nix { }; + inherit (qt6) + qtbase + qtsvg + qttools + qtwayland + wrapQtAppsHook + ; +in stdenv.mkDerivation (finalAttrs: { pname = "duckstation"; - version = "0.1-6292"; + version = "0.1-6658"; src = fetchFromGitHub { owner = "stenzek"; repo = "duckstation"; - rev = "0bc42c38aab49030118f507c9783de047769148b"; - hash = "sha256-8OavixSwEWihFY2fEdsepR1lqWlTH+//xZRKwb7lFCQ="; + rev = "4e0c417add264226b3db065c1466791f0591a1b5"; + hash = "sha256-fN0bcjqjMmK3qVLlrYmR2VgjK0BjdK4nUj8vNYdFC3I="; }; patches = [ @@ -40,8 +48,8 @@ stdenv.mkDerivation (finalAttrs: { src = ./002-hardcode-vars.diff; gitHash = finalAttrs.src.rev; gitBranch = "master"; - gitTag = "${finalAttrs.version}-g0bc42c38"; - gitDate = "2024-02-06T22:47:47+09:00"; + gitTag = "${finalAttrs.version}-g4e0c417a"; + gitDate = "2024-04-16T12:49:54+10:00"; }) ]; @@ -59,9 +67,11 @@ stdenv.mkDerivation (finalAttrs: { curl libXrandr libbacktrace + libwebp qtbase qtsvg qtwayland + shaderc-patched wayland ] ++ cubeb.passthru.backendLibs; @@ -72,10 +82,13 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_TESTS" true) ]; - doCheck = true; - checkPhase = '' + doInstallCheck = true; + + installCheckPhase = '' runHook preCheck - bin/common-tests + + $out/share/duckstation/common-tests + runHook postCheck ''; diff --git a/pkgs/by-name/du/duckstation/shaderc-patched.nix b/pkgs/by-name/du/duckstation/shaderc-patched.nix new file mode 100644 index 0000000000000..72aa4b17ca087 --- /dev/null +++ b/pkgs/by-name/du/duckstation/shaderc-patched.nix @@ -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" + ]; + }) + ]; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c99d2166fc883..a4d7e00bd6168 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2632,8 +2632,6 @@ with pkgs; inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa; }; - duckstation = qt6Packages.callPackage ../applications/emulators/duckstation { }; - dynamips = callPackage ../applications/emulators/dynamips { }; emu2 = callPackage ../applications/emulators/emu2 { };