nixpkgs/pkgs/applications/virtualization/8086tiny/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

44 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, localBios ? true, nasm ? null
, sdlSupport ? true, SDL ? null }:
assert sdlSupport -> (SDL != null);
stdenv.mkDerivation rec {
pname = "8086tiny";
version = "1.25";
src = fetchFromGitHub {
owner = "adriancable";
repo = pname;
rev = "c79ca2a34d96931d55ef724c815b289d0767ae3a";
sha256 = "00aydg8f28sgy8l3rd2a7jvp56lx3b63hhak43p7g7vjdikv495w";
};
buildInputs = with stdenv.lib;
optionals localBios [ nasm ]
++ optionals sdlSupport [ SDL ];
bios = localBios;
builder = ./builder.sh;
meta = with lib; {
description = "An open-source small 8086 emulator";
longDescription = ''
8086tiny is a tiny, open-source (MIT), portable (little-endian hosts)
Intel PC emulator, powerful enough to run DOS, Windows 3.0, Excel, MS
Flight Simulator, AutoCAD, Lotus 1-2-3, and similar applications. 8086tiny
emulates a "late 80's era" PC XT-type machine.
8086tiny is based on an IOCCC 2013 winning entry. In fact that is the
"unobfuscated" version :)
'';
homepage = "https://github.com/adriancable/8086tiny";
license = licenses.mit;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.linux;
};
}