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