diff --git a/pkgs/by-name/bo/bochs/fix-darwin-build.patch b/pkgs/by-name/bo/bochs/fix-darwin-build.patch new file mode 100644 index 000000000000..f3a2b01b5ca9 --- /dev/null +++ b/pkgs/by-name/bo/bochs/fix-darwin-build.patch @@ -0,0 +1,15 @@ +diff --git a/gui/keymap.cc b/gui/keymap.cc +index 3426b6b..7bf76d8 100644 +--- a/gui/keymap.cc ++++ b/gui/keymap.cc +@@ -30,6 +30,10 @@ + #include "gui.h" + #include "keymap.h" + ++#if defined(__APPLE__) ++#include ++#endif ++ + // Table of bochs "BX_KEY_*" symbols + // the table must be in BX_KEY_* order + const char *bx_key_symbol[BX_KEY_NBKEYS] = { diff --git a/pkgs/by-name/bo/bochs/package.nix b/pkgs/by-name/bo/bochs/package.nix index a28522dce7dd..843452c8126f 100644 --- a/pkgs/by-name/bo/bochs/package.nix +++ b/pkgs/by-name/bo/bochs/package.nix @@ -32,6 +32,9 @@ stdenv.mkDerivation (finalAttrs: { url = "mirror://sourceforge/project/bochs/bochs/${finalAttrs.version}/bochs-${finalAttrs.version}.tar.gz"; hash = "sha256-y29UK1HzWizJIGsqmA21YCt80bfPLk7U8Ras1VB3gao="; }; + # Fix build on darwin, remove on next version + # https://sourceforge.net/p/bochs/bugs/1466/ + patches = lib.optional stdenv.hostPlatform.isDarwin ./fix-darwin-build.patch; nativeBuildInputs = [ docbook_xml_dtd_45 @@ -82,11 +85,6 @@ stdenv.mkDerivation (finalAttrs: { (lib.enableFeature false "docbook") # Broken - it requires docbook2html - # Dangerous options - they are marked as "incomplete/experimental" on Bochs documentation - (lib.enableFeature false "3dnow") - (lib.enableFeature false "monitor-mwait") - (lib.enableFeature false "raw-serial") - # These are completely configurable, and they don't depend of external tools (lib.enableFeature true "a20-pin") (lib.enableFeature true "avx") @@ -153,7 +151,7 @@ stdenv.mkDerivation (finalAttrs: { Intel x86 CPU, common I/O devices, and a custom BIOS. ''; license = lib.licenses.lgpl2Plus; - maintainers = with lib.maintainers; [ ]; + maintainers = with lib.maintainers; [ patrickdag ]; platforms = lib.platforms.unix; }; })