From bcc00506477f0a971a31dc7b2dd07336ae751f71 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 29 May 2025 17:52:02 +0200 Subject: [PATCH 1/3] bochs: rely on upstream defaults for experimental options --- pkgs/by-name/bo/bochs/package.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/by-name/bo/bochs/package.nix b/pkgs/by-name/bo/bochs/package.nix index a28522dce7dd..88d5fca1c0a5 100644 --- a/pkgs/by-name/bo/bochs/package.nix +++ b/pkgs/by-name/bo/bochs/package.nix @@ -82,11 +82,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") From 103665f73618d96d20c95c23aeeabb524f41e94d Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 30 May 2025 11:40:52 +0200 Subject: [PATCH 2/3] bochs: add patrickdag as maintainer --- pkgs/by-name/bo/bochs/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/bo/bochs/package.nix b/pkgs/by-name/bo/bochs/package.nix index 88d5fca1c0a5..93d7a0182962 100644 --- a/pkgs/by-name/bo/bochs/package.nix +++ b/pkgs/by-name/bo/bochs/package.nix @@ -148,7 +148,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; }; }) From 0c0da739e518f6e84821fec6b91ce0f2f15ddac5 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 1 Jun 2025 11:26:35 +0200 Subject: [PATCH 3/3] bochs: fix build on darwin --- pkgs/by-name/bo/bochs/fix-darwin-build.patch | 15 +++++++++++++++ pkgs/by-name/bo/bochs/package.nix | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/by-name/bo/bochs/fix-darwin-build.patch 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 93d7a0182962..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