Skip to content

Commit

Permalink
duckstation: 0.1-6292 -> 0.1-6658
Browse files Browse the repository at this point in the history
Now with a patched shaderc.

Co-authored-by: qubitnano <146656568+qubitnano@users.noreply.github.com>
  • Loading branch information
AndersonTorres and qubitnano committed May 8, 2024
1 parent cfb0c6e commit 9b5cb75
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 22 deletions.
47 changes: 25 additions & 22 deletions pkgs/by-name/du/duckstation/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
fetchFromGitHub,
libXrandr,
libbacktrace,
libwebp,
makeWrapper,
ninja,
pkg-config,
qt6,
shaderc,
stdenv,
substituteAll,
vulkan-loader,
wayland,
}:

let
inherit (qt6)
qtbase
Expand All @@ -29,13 +30,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 = [
Expand All @@ -46,8 +47,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";
})
];

Expand All @@ -66,9 +67,11 @@ stdenv.mkDerivation (finalAttrs: {
extra-cmake-modules
libXrandr
libbacktrace
libwebp
qtbase
qtsvg
qtwayland
shaderc
wayland
]
++ cubeb.passthru.backendLibs;
Expand All @@ -77,18 +80,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
Expand All @@ -103,14 +107,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
Expand Down
16 changes: 16 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,22 @@ with pkgs;
inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa;
};

duckstation = callPackage ../by-name/du/duckstation/package.nix {
shaderc = shaderc.overrideAttrs (old: {
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"
];
})
];
});
};

dynamips = callPackage ../applications/emulators/dynamips { };

emu2 = callPackage ../applications/emulators/emu2 { };
Expand Down

0 comments on commit 9b5cb75

Please sign in to comment.