2019-04-21 14:04:10 +02:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng, graphicsmagick }:
|
2005-12-03 03:32:02 +01:00
|
|
|
|
2017-11-14 01:07:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-11-11 03:37:00 +01:00
|
|
|
name = "dosbox-0.74-2";
|
2016-02-11 00:25:41 +01:00
|
|
|
|
2005-12-03 03:32:02 +01:00
|
|
|
src = fetchurl {
|
2009-03-16 13:22:47 +01:00
|
|
|
url = "mirror://sourceforge/dosbox/${name}.tar.gz";
|
2018-11-11 03:37:00 +01:00
|
|
|
sha256 = "1ksp1b5szi0vy4x55rm3j1y9wq5mlslpy8llpg87rpdyjlsk0xvh";
|
2005-12-03 03:32:02 +01:00
|
|
|
};
|
2012-01-23 18:21:37 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-11 00:25:41 +01:00
|
|
|
|
2018-11-11 03:37:00 +01:00
|
|
|
buildInputs = [ SDL SDL_net SDL_sound libGLU_combined libpng ];
|
2016-05-03 00:58:02 +02:00
|
|
|
|
2019-04-21 14:04:10 +02:00
|
|
|
nativeBuildInputs = [ graphicsmagick ];
|
|
|
|
|
2017-11-14 01:07:57 +01:00
|
|
|
configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
|
|
|
|
|
2009-05-14 13:17:41 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "dosbox";
|
|
|
|
exec = "dosbox";
|
2019-04-21 14:04:10 +02:00
|
|
|
icon = "dosbox";
|
2009-05-14 13:17:41 +02:00
|
|
|
comment = "x86 emulator with internal DOS";
|
|
|
|
desktopName = "DOSBox";
|
|
|
|
genericName = "DOS emulator";
|
|
|
|
categories = "Application;Emulator;";
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/applications
|
2009-05-14 13:17:41 +02:00
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
2019-04-21 14:04:10 +02: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 13:17:41 +02:00
|
|
|
'';
|
2009-03-16 13:22:47 +01:00
|
|
|
|
2018-11-11 03:37:00 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-11-14 01:08:19 +01:00
|
|
|
meta = with lib; {
|
2009-03-16 13:22:47 +01:00
|
|
|
homepage = http://www.dosbox.com/;
|
|
|
|
description = "A DOS emulator";
|
2017-11-14 01:08:19 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
2017-12-05 12:57:11 +01:00
|
|
|
license = licenses.gpl2;
|
2009-03-16 13:22:47 +01:00
|
|
|
};
|
2005-12-03 03:32:02 +01:00
|
|
|
}
|