From 4c57072292a8d7e2f9934fedf24687fbc209dc86 Mon Sep 17 00:00:00 2001 From: Shiroki Satsuki Date: Wed, 27 Dec 2023 05:33:29 +0800 Subject: [PATCH] dosbox-staging: patches to deal with pagesize detection --- pkgs/by-name/do/dosbox-staging/package.nix | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index ed2161e455e8..4fa16600d1d5 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -58,6 +58,39 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-WtTVSWWSlfXrdPVsnlDe4P5K/Fnj4QsOzx3Wo/Kusmg="; includes = [ "src/gui/meson.build" ]; }) + ] + # Pagesize detection via syscall; remove when next stable version arrives + ++ [ + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Fix ppc64le backend and 64K page size support (#2828) + name = "meson-add-ppc64.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/765bcc2b1d87050a4ea366bf22e1db075ad5660b.patch"; + hash = "sha256-RtkidyF7w6RrPmCKK4Bd+3FtAn/+/38xk2cl32+yzxw="; + includes = [ "meson.build" ]; + }) + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Account for debian powerpc prefix (instead of ppc) + name = "meson-powerpc64le.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/d44aa7441cd871ffac08974f22af7a735a839288.patch"; + hash = "sha256-oMZtfmB1CRlDWyXwEWc3XzC+XxKazXDgo+jUiNBoJDw="; + includes = [ "meson.build" ]; + }) + (fetchpatch { + # Added as a parent commit of 7e20f6e + # Restore the PowerPC dynrec core to working order + name = "meson-option-write-or-execute.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/ef86642de390839afc77b2b591a6ea9ac43909b3.patch"; + hash = "sha256-htOKEaXRRy28XNMX/t6uFTBLCkTr7YPtfmI9UyIBiz4="; + includes = [ "meson_options.txt" ]; + }) + (fetchpatch { + # Use a system call to detect the page size + name = "meson-detect-pagesize-by-syscall.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/7e20f6e401956a7a308f1b3462294d7ac9fa5db8.patch"; + hash = "sha256-QW9lpHWCYSlQFgTqX/UxHAAWisz4wfPrdjLqROn/wR0="; + }) ]; nativeBuildInputs = [