diff --git a/pkgs/by-name/du/duckstation/package.nix b/pkgs/by-name/du/duckstation/package.nix index be18010e62d239c..20aaba77a58bf3e 100644 --- a/pkgs/by-name/du/duckstation/package.nix +++ b/pkgs/by-name/du/duckstation/package.nix @@ -1,6 +1,7 @@ { lib, SDL2, + callPackage, cmake, cubeb, curl, @@ -8,6 +9,7 @@ fetchFromGitHub, libXrandr, libbacktrace, + libwebp, makeWrapper, ninja, pkg-config, @@ -17,8 +19,8 @@ vulkan-loader, wayland, }: - let + shaderc-patched = callPackage ./shaderc-patched.nix { }; inherit (qt6) qtbase qtsvg @@ -29,13 +31,13 @@ let 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 = [ @@ -46,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"; }) ]; @@ -66,9 +68,11 @@ stdenv.mkDerivation (finalAttrs: { extra-cmake-modules libXrandr libbacktrace + libwebp qtbase qtsvg qtwayland + shaderc-patched wayland ] ++ cubeb.passthru.backendLibs; @@ -77,18 +81,19 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_TESTS" true) ]; + qtWrapperArgs = + let + libPath = lib.makeLibraryPath ([ + vulkan-loader + ] ++ cubeb.passthru.backendLibs); + in [ + "--prefix LD_LIBRARY_PATH : ${libPath}" + ]; + strictDeps = true; doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - - $out/share/duckstation/common-tests - - runHook postInstallCheck - ''; - installPhase = '' runHook preInstall @@ -103,14 +108,13 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - qtWrapperArgs = - let - libPath = lib.makeLibraryPath ([ - vulkan-loader - ] ++ cubeb.passthru.backendLibs); - in [ - "--prefix LD_LIBRARY_PATH : ${libPath}" - ]; + installCheckPhase = '' + runHook preInstallCheck + + $out/share/duckstation/common-tests + + runHook postInstallCheck + ''; # 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 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 000000000000000..72aa4b17ca087b8 --- /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" + ]; + }) + ]; +})