2019-11-10 16:44:34 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU, libGL, libpng, graphicsmagick }:
|
2005-12-03 02:32:02 +00:00
|
|
|
|
2017-11-14 00:07:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-07-14 12:39:15 +01:00
|
|
|
name = "dosbox-0.74-3";
|
2016-02-10 23:25:41 +00:00
|
|
|
|
2005-12-03 02:32:02 +00:00
|
|
|
src = fetchurl {
|
2009-03-16 12:22:47 +00:00
|
|
|
url = "mirror://sourceforge/dosbox/${name}.tar.gz";
|
2019-07-14 12:39:15 +01:00
|
|
|
sha256 = "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0";
|
2005-12-03 02:32:02 +00:00
|
|
|
};
|
2012-01-23 17:21:37 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-10 23:25:41 +00:00
|
|
|
|
2019-11-10 16:44:34 +00:00
|
|
|
buildInputs = [ SDL SDL_net SDL_sound libGLU libGL libpng ];
|
2016-05-02 23:58:02 +01:00
|
|
|
|
2019-04-21 13:04:10 +01:00
|
|
|
nativeBuildInputs = [ graphicsmagick ];
|
|
|
|
|
2017-11-14 00:07:57 +00:00
|
|
|
configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
|
|
|
|
|
2009-05-14 12:17:41 +01:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "dosbox";
|
|
|
|
exec = "dosbox";
|
2019-04-21 13:04:10 +01:00
|
|
|
icon = "dosbox";
|
2009-05-14 12:17:41 +01:00
|
|
|
comment = "x86 emulator with internal DOS";
|
|
|
|
desktopName = "DOSBox";
|
|
|
|
genericName = "DOS emulator";
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Emulator;";
|
2009-05-14 12:17:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/applications
|
2009-05-14 12:17:41 +01:00
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
2019-04-21 13:04:10 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/icons/hicolor/256x256/apps
|
|
|
|
gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
|
2009-05-14 12:17:41 +01:00
|
|
|
'';
|
2009-03-16 12:22:47 +00:00
|
|
|
|
2018-11-11 02:37:00 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-11-14 00:08:19 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.dosbox.com/";
|
2009-03-16 12:22:47 +00:00
|
|
|
description = "A DOS emulator";
|
2017-11-14 00:08:19 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
2017-12-05 11:57:11 +00:00
|
|
|
license = licenses.gpl2;
|
2009-03-16 12:22:47 +00:00
|
|
|
};
|
2005-12-03 02:32:02 +00:00
|
|
|
}
|