Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge request: A Nix expression for Bochs #1266

Merged
merged 4 commits into from
Nov 28, 2013
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions pkgs/applications/virtualization/bochs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ stdenv, fetchurl
, libX11 , mesa
, sdlSupport ? true, SDL ? null
, termSupport ? true , ncurses ? null, readline ? null
, wxSupport ? true , gtk ? null , wxGTK ? null , pkgconfig ? null
, wgetSupport ? false, wget ? null
, curlSupport ? false, curl ? null
}:


assert sdlSupport -> (SDL != null);
assert termSupport -> (ncurses != null&& readline != null);
assert wxSupport -> (gtk != null && wxGTK != null && pkgconfig != null);
assert wgetSupport -> (wget != null);
assert curlSupport -> (curl != null);

stdenv.mkDerivation rec {

name = "bochs-${version}";
version = "2.6.2";

src = fetchurl {
url = "http://downloads.sourceforge.net/project/bochs/bochs/${version}/${name}.tar.gz";
sha256 = "042blm1xb9ig4fh2bv8nrrfpgkcxy4hq8yrkx7mrdpm5g4mvfwyr";
};

buildInputs = with stdenv.lib;
[ libX11 mesa ]
++ optionals sdlSupport [ SDL ]
++ optionals termSupport [ readline ncurses ]
++ optionals wxSupport [ gtk wxGTK pkgconfig ]
++ optionals wgetSupport [ wget ]
++ optionals curlSupport [ curl ];

configureFlags = ''
--with-x11
--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
--enable-ne2000
--enable-e1000
--enable-sb16
--enable-voodoo
--enable-usb
--enable-pnic
'';

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/;
license = "LGPL";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also set meta.platforms

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ let

bmon = callPackage ../tools/misc/bmon { };

bochs = callPackage ../applications/virtualization/bochs { };

boomerang = callPackage ../development/tools/boomerang {
stdenv = overrideGCC stdenv gcc47;
};
Expand Down