diff options
author | Anderson Torres <torres.anderson.85@gmail.com> | 2013-11-23 02:22:05 +0100 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@gmail.com> | 2013-11-23 02:22:05 +0100 |
commit | fee5929a42e2d8f70bff1b11a3d47af930e65a88 (patch) | |
tree | 8c75eb84b723fb35dd9917b8d97423caea583087 /pkgs/applications/virtualization | |
parent | fa9284b941cfe0ff0002d6e641096df4e04f9ac1 (diff) | |
download | nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar.gz nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar.bz2 nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar.lz nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar.xz nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.tar.zst nixlib-fee5929a42e2d8f70bff1b11a3d47af930e65a88.zip |
First commit.
Added Nix expression for Bochs - "the highly portable x86 emulator".
Diffstat (limited to 'pkgs/applications/virtualization')
-rw-r--r-- | pkgs/applications/virtualization/bochs/default.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix new file mode 100644 index 000000000000..440ac66b6c5f --- /dev/null +++ b/pkgs/applications/virtualization/bochs/default.nix @@ -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"; + }; +} \ No newline at end of file |