From fee5929a42e2d8f70bff1b11a3d47af930e65a88 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 23 Nov 2013 02:22:05 +0100 Subject: [PATCH 1/4] First commit. Added Nix expression for Bochs - "the highly portable x86 emulator". --- .../virtualization/bochs/default.nix | 61 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/applications/virtualization/bochs/default.nix 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a6c2cd289f3..0a16cfa61362 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -533,6 +533,8 @@ let bmon = callPackage ../tools/misc/bmon { }; + bochs = callPackage ../applications/virtualization/bochs { }; + boomerang = callPackage ../development/tools/boomerang { stdenv = overrideGCC stdenv gcc47; }; From cb73e54d984f1e89d915a6287023945bee4ecd86 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 23 Nov 2013 02:34:40 +0100 Subject: [PATCH 2/4] A not so clear README file. --- README | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000000000000..32a0dabd8ff3 --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +This is the AndersonTorres's fork of NixOS tree from Github. + +Here I will develop scripts for my favourite softwares - some of them are Bochs, mpv, and Mate Desktop. From c30651d75f05e37e69b134657d11a9c794b13dbf Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 23 Nov 2013 10:28:28 +0100 Subject: [PATCH 3/4] Deleting README to conform to some style standards. --- README | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 32a0dabd8ff3..000000000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -This is the AndersonTorres's fork of NixOS tree from Github. - -Here I will develop scripts for my favourite softwares - some of them are Bochs, mpv, and Mate Desktop. From 81d7906e1908c2cc6302432cb1d591a0877430cc Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 24 Nov 2013 16:30:16 +0100 Subject: [PATCH 4/4] Minor changes to Bochs expression. --- pkgs/applications/virtualization/bochs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix index 440ac66b6c5f..6b8cf5dc0356 100644 --- a/pkgs/applications/virtualization/bochs/default.nix +++ b/pkgs/applications/virtualization/bochs/default.nix @@ -57,5 +57,6 @@ stdenv.mkDerivation rec { ''; homepage = http://bochs.sourceforge.net/; license = "LGPL"; + platforms = stdenv.lib.platforms.linux; }; -} \ No newline at end of file +}