2021-06-28 04:03:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, SDL2
|
|
|
|
, curl
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
, docbook_xsl
|
|
|
|
, gtk2
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libX11
|
|
|
|
, libXpm
|
|
|
|
, libtool
|
|
|
|
, ncurses
|
|
|
|
, pkg-config
|
|
|
|
, readline
|
|
|
|
, wget
|
|
|
|
, wxGTK
|
2014-09-29 01:20:34 +00:00
|
|
|
}:
|
2013-11-23 01:22:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "bochs";
|
2021-08-06 08:09:22 +00:00
|
|
|
version = "2.7";
|
2013-11-23 01:22:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-07 01:01:24 +00:00
|
|
|
url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${pname}-${version}.tar.gz";
|
2021-08-06 08:09:22 +00:00
|
|
|
hash = "sha256-oBCrG/3HKsWgjS4kEs1HHA/r1mrx2TSbwNeWh53lsXo=";
|
2013-11-23 01:22:05 +00:00
|
|
|
};
|
2014-03-22 09:01:42 +00:00
|
|
|
|
2021-06-28 04:03:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
docbook_xsl
|
2021-08-06 23:47:09 +00:00
|
|
|
libtool
|
2021-06-28 04:03:36 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
curl
|
|
|
|
gtk2
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libX11
|
|
|
|
libXpm
|
|
|
|
ncurses
|
|
|
|
readline
|
|
|
|
wget
|
|
|
|
wxGTK
|
|
|
|
];
|
2013-11-23 01:22:05 +00:00
|
|
|
|
2014-09-29 01:20:34 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-x=yes"
|
|
|
|
"--with-x11=yes"
|
|
|
|
|
|
|
|
"--with-rfb=no"
|
|
|
|
"--with-vncsrv=no"
|
2021-09-17 01:10:20 +00:00
|
|
|
"--with-nogui"
|
2014-09-29 01:20:34 +00:00
|
|
|
|
|
|
|
# These will always be "yes" on NixOS
|
|
|
|
"--enable-ltdl-install=yes"
|
|
|
|
"--enable-readline=yes"
|
|
|
|
"--enable-all-optimizations=yes"
|
|
|
|
"--enable-logging=yes"
|
|
|
|
"--enable-xpm=yes"
|
|
|
|
|
|
|
|
# ... whereas these, always "no"!
|
|
|
|
"--enable-cpp=no"
|
|
|
|
"--enable-instrumentation=no"
|
|
|
|
|
|
|
|
"--enable-docbook=no" # Broken - it requires docbook2html
|
|
|
|
|
|
|
|
# Dangerous options - they are marked as "incomplete/experimental" on Bochs documentation
|
|
|
|
"--enable-3dnow=no"
|
|
|
|
"--enable-monitor-mwait=no"
|
2021-06-28 04:03:36 +00:00
|
|
|
"--enable-raw-serial=no"
|
|
|
|
|
2017-07-10 10:55:09 +00:00
|
|
|
# These are completely configurable, and they don't depend of external tools
|
2021-06-28 04:03:36 +00:00
|
|
|
"--enable-a20-pin"
|
|
|
|
"--enable-avx"
|
|
|
|
"--enable-busmouse"
|
|
|
|
"--enable-cdrom"
|
|
|
|
"--enable-clgd54xx"
|
|
|
|
"--enable-configurable-msrs"
|
|
|
|
"--enable-cpu-level=6" # from 3 to 6
|
|
|
|
"--enable-debugger" #conflicts with gdb-stub option
|
|
|
|
"--enable-debugger-gui"
|
|
|
|
"--enable-e1000"
|
|
|
|
"--enable-es1370"
|
|
|
|
"--enable-evex"
|
|
|
|
"--enable-fpu"
|
|
|
|
"--enable-gdb-stub=no" # conflicts with debugger option
|
|
|
|
"--enable-handlers-chaining"
|
|
|
|
"--enable-idle-hack"
|
|
|
|
"--enable-iodebug"
|
|
|
|
"--enable-large-ramfile"
|
|
|
|
"--enable-largefile"
|
|
|
|
"--enable-ne2000"
|
|
|
|
"--enable-pci"
|
2021-08-06 08:09:22 +00:00
|
|
|
"--enable-plugins=yes"
|
2021-06-28 04:03:36 +00:00
|
|
|
"--enable-pnic"
|
|
|
|
"--enable-repeat-speedups"
|
|
|
|
"--enable-sb16"
|
|
|
|
"--enable-show-ips"
|
|
|
|
"--enable-smp"
|
2021-09-12 01:23:32 +00:00
|
|
|
"--enable-vmx=2"
|
2021-06-28 04:03:36 +00:00
|
|
|
"--enable-svm"
|
|
|
|
"--enable-trace-linking"
|
|
|
|
"--enable-usb"
|
|
|
|
"--enable-usb-ehci"
|
|
|
|
"--enable-usb-ohci"
|
|
|
|
"--enable-usb-xhci"
|
|
|
|
"--enable-voodoo"
|
|
|
|
"--enable-x86-64"
|
|
|
|
"--enable-x86-debugger"
|
|
|
|
]
|
|
|
|
# Boolean flags
|
|
|
|
++ lib.optionals (SDL2 != null) [ "--with-sdl2" ]
|
|
|
|
++ lib.optionals (ncurses != null) [ "--with-term" ]
|
|
|
|
++ lib.optionals (gtk2 != null && wxGTK != null) [ "--with-wx" ];
|
2013-11-23 01:22:05 +00:00
|
|
|
|
2017-11-16 12:58:39 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-06-28 04:03:36 +00:00
|
|
|
meta = with lib; {
|
2021-07-31 17:01:50 +00:00
|
|
|
homepage = "https://bochs.sourceforge.io/";
|
2013-11-23 01:22:05 +00:00
|
|
|
description = "An open-source IA-32 (x86) PC emulator";
|
|
|
|
longDescription = ''
|
2017-07-10 10:55:09 +00:00
|
|
|
Bochs is an open-source (LGPL), highly portable IA-32 PC emulator, written
|
|
|
|
in C++, that runs on most popular platforms. It includes emulation of the
|
|
|
|
Intel x86 CPU, common I/O devices, and a custom BIOS.
|
2013-11-23 01:22:05 +00:00
|
|
|
'';
|
2014-09-10 18:59:54 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2019-12-29 17:48:29 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2017-07-10 10:55:09 +00:00
|
|
|
platforms = platforms.unix;
|
2013-11-23 01:22:05 +00:00
|
|
|
};
|
2013-11-24 15:30:16 +00:00
|
|
|
}
|
2017-07-10 10:55:09 +00:00
|
|
|
# TODO: a better way to organize the options
|
2021-08-06 23:47:09 +00:00
|
|
|
# TODO: docbook (docbook-tools from RedHat mirrors should help)
|