2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-07-14 12:49:19 +00:00
|
|
|
, autoreconfHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, SDL
|
2022-02-10 20:34:41 +00:00
|
|
|
, SDL_net
|
|
|
|
, SDL_sound
|
|
|
|
, copyDesktopItems
|
|
|
|
, graphicsmagick
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libpng
|
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "dosbox";
|
|
|
|
version = "0.74-3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/dosbox/dosbox-${version}.tar.gz";
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-wNE91+0u02O2jeYVR1eB6JHNWC6BYrXDZpE3UCIiJgo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
autoreconfHook
|
2022-02-10 20:34:41 +00:00
|
|
|
copyDesktopItems
|
|
|
|
graphicsmagick
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
SDL
|
2022-02-10 20:34:41 +00:00
|
|
|
SDL_net
|
|
|
|
SDL_sound
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libpng
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "dosbox";
|
|
|
|
exec = "dosbox";
|
|
|
|
icon = "dosbox";
|
|
|
|
comment = "x86 dos emulator";
|
|
|
|
desktopName = "DOSBox";
|
|
|
|
genericName = "DOS emulator";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Emulator" "Game" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/icons/hicolor/256x256/apps
|
|
|
|
gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.dosbox.com/";
|
|
|
|
description = "A DOS emulator";
|
2022-02-10 20:34:41 +00:00
|
|
|
longDescription = ''
|
|
|
|
DOSBox is an emulator that recreates a MS-DOS compatible environment
|
|
|
|
(complete with Sound, Input, Graphics and even basic networking). This
|
|
|
|
environment is complete enough to run many classic MS-DOS games completely
|
|
|
|
unmodified. In order to utilize all of DOSBox's features you need to first
|
|
|
|
understand some basic concepts about the MS-DOS environment.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
2022-02-10 20:34:41 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|