11 stdenv.mkDerivation rec {
15 src = fetchFromGitHub {
16 owner = "adriancable";
18 rev = "c79ca2a34d96931d55ef724c815b289d0767ae3a";
19 sha256 = "00aydg8f28sgy8l3rd2a7jvp56lx3b63hhak43p7g7vjdikv495w";
22 buildInputs = lib.optional localBios nasm ++ lib.optional sdlSupport SDL;
24 makeFlags = [ "8086tiny" ];
26 postBuild = lib.optionalString localBios ''
28 nasm -f bin bios.asm -o bios
35 mkdir -p $out/bin $out/share/8086tiny $out/share/doc/8086tiny/images
36 install -m 755 8086tiny $out/bin
37 install -m 644 fd.img $out/share/8086tiny/8086tiny-floppy.img
38 install -m 644 bios_source/bios.asm $out/share/8086tiny/8086tiny-bios-src.asm
39 install -m 644 docs/8086tiny.css $out/share/doc/8086tiny
40 install -m 644 docs/doc.html $out/share/doc/$name
42 for image in docs/images/\*.gif; do
43 install -m 644 $image $out/share/doc/8086tiny/images
46 install -m 644 ${lib.optionalString localBios "bios_source/"}bios \
47 $out/share/8086tiny/8086tiny-bios
53 homepage = "https://github.com/adriancable/8086tiny";
54 description = "Open-source small 8086 emulator";
56 8086tiny is a tiny, open-source (MIT), portable (little-endian hosts)
57 Intel PC emulator, powerful enough to run DOS, Windows 3.0, Excel, MS
58 Flight Simulator, AutoCAD, Lotus 1-2-3, and similar applications. 8086tiny
59 emulates a "late 80's era" PC XT-type machine.
61 8086tiny is based on an IOCCC 2013 winning entry. In fact that is the
62 "unobfuscated" version :)
64 license = licenses.mit;
65 maintainers = [ maintainers.AndersonTorres ];
66 platforms = platforms.linux;
67 mainProgram = "8086tiny";