2013-11-23 02:22:05 +01:00
|
|
|
{ stdenv, fetchurl
|
2014-08-11 02:06:39 +02:00
|
|
|
, pkgconfig, gtk
|
2013-11-23 02:22:05 +01:00
|
|
|
, libX11 , mesa
|
|
|
|
, sdlSupport ? true, SDL ? null
|
|
|
|
, termSupport ? true , ncurses ? null, readline ? null
|
2014-08-11 02:06:39 +02:00
|
|
|
, wxSupport ? false, wxGTK ? null
|
2013-11-23 02:22:05 +01:00
|
|
|
, wgetSupport ? false, wget ? null
|
2014-09-10 20:59:54 +02:00
|
|
|
, curlSupport ? false, curl ? null }:
|
2013-11-23 02:22:05 +01:00
|
|
|
|
|
|
|
assert sdlSupport -> (SDL != null);
|
|
|
|
assert termSupport -> (ncurses != null&& readline != null);
|
2014-08-11 02:06:39 +02:00
|
|
|
assert wxSupport -> (gtk != null && wxGTK != null);
|
2013-11-23 02:22:05 +01:00
|
|
|
assert wgetSupport -> (wget != null);
|
|
|
|
assert curlSupport -> (curl != null);
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "bochs-${version}";
|
2014-08-11 02:06:39 +02:00
|
|
|
version = "2.6.6";
|
2013-11-23 02:22:05 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://downloads.sourceforge.net/project/bochs/bochs/${version}/${name}.tar.gz";
|
2014-08-11 02:06:39 +02:00
|
|
|
sha256 = "0nlrl218x93vz97n46aw2szsalx97r020mn43fjsif100v7zix6f";
|
2013-11-23 02:22:05 +01:00
|
|
|
};
|
2014-03-22 10:01:42 +01:00
|
|
|
|
2013-11-23 02:22:05 +01:00
|
|
|
buildInputs = with stdenv.lib;
|
2014-08-11 02:06:39 +02:00
|
|
|
[ pkgconfig gtk libX11 mesa ]
|
2013-11-23 02:22:05 +01:00
|
|
|
++ optionals sdlSupport [ SDL ]
|
|
|
|
++ optionals termSupport [ readline ncurses ]
|
2014-08-11 02:06:39 +02:00
|
|
|
++ optionals wxSupport [ wxGTK ]
|
2013-11-23 02:22:05 +01:00
|
|
|
++ optionals wgetSupport [ wget ]
|
|
|
|
++ optionals curlSupport [ curl ];
|
|
|
|
|
|
|
|
configureFlags = ''
|
2014-03-22 10:01:42 +01:00
|
|
|
--with-x11
|
2013-11-23 02:22:05 +01:00
|
|
|
--with-term=${if termSupport then "yes" else "no"}
|
|
|
|
--with-sdl=${if sdlSupport then "yes" else "no"}
|
|
|
|
--with-svga=no
|
|
|
|
--with-wx=${if wxSupport then "yes" else "no"}
|
|
|
|
--enable-readline
|
|
|
|
--enable-plugins=no
|
|
|
|
--enable-disasm
|
|
|
|
--enable-debugger
|
2014-03-22 10:01:42 +01:00
|
|
|
--enable-ne2000
|
|
|
|
--enable-e1000
|
|
|
|
--enable-sb16
|
|
|
|
--enable-voodoo
|
|
|
|
--enable-usb
|
2013-11-23 02:22:05 +01:00
|
|
|
--enable-pnic
|
|
|
|
'';
|
|
|
|
|
2014-08-11 02:06:39 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-I${gtk}/include/gtk-2.0/";
|
|
|
|
|
2014-09-10 20:59:54 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-11-23 02:22:05 +01:00
|
|
|
description = "An open-source IA-32 (x86) PC emulator";
|
|
|
|
longDescription = ''
|
2014-09-10 20:59:54 +02: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 02:22:05 +01:00
|
|
|
'';
|
|
|
|
homepage = http://bochs.sourceforge.net/;
|
2014-09-10 20:59:54 +02:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
|
|
|
platforms = platforms.linux;
|
2013-11-23 02:22:05 +01:00
|
|
|
};
|
2013-11-24 16:30:16 +01:00
|
|
|
}
|
2014-09-10 20:59:54 +02:00
|
|
|
|
2014-08-11 02:06:39 +02:00
|
|
|
# TODO: study config.bochs.* implementation (like config.ffmpeg.* options)
|