2018-02-24 13:12:44 +00:00
|
|
|
{ stdenv, lib, fetchurl, SDL, makeDesktopItem, libGLU_combined }:
|
2005-12-03 02:32:02 +00:00
|
|
|
|
2017-11-14 00:07:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2010-05-28 10:35:49 +01:00
|
|
|
name = "dosbox-0.74";
|
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";
|
2010-05-28 10:35:49 +01:00
|
|
|
sha256 = "01cfjc5bs08m4w79nbxyv7rnvzq2yckmgrbq36njn06lw8b4kxqk";
|
2005-12-03 02:32:02 +00:00
|
|
|
};
|
2012-01-23 17:21:37 +00:00
|
|
|
|
|
|
|
patches =
|
|
|
|
[ # Fix building with GCC 4.6.
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-emulation/dosbox/files/dosbox-0.74-gcc46.patch?revision=1.1";
|
|
|
|
sha256 = "03iv1ph7fccfw327ngnhvzwyiix7fsbdb5mmpxivzkidhlrssxq9";
|
|
|
|
})
|
2017-11-14 00:07:57 +00:00
|
|
|
(fetchurl {
|
|
|
|
url = "https://svnweb.freebsd.org/ports/head/emulators/dosbox/files/patch-src_gui_sdlmain.cpp?revision=435580&view=co&pathrev=435580";
|
|
|
|
sha256 = "1mbj5wrn53k0zds2adys34949vzsbfgm0pmsyx14v9j0cxi7drca";
|
|
|
|
name = "patch-src_gui_sdlmain.cpp";
|
|
|
|
})
|
2012-01-23 17:21:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = "-p0";
|
2016-02-10 23:25:41 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-10 23:25:41 +00:00
|
|
|
|
2018-02-24 13:12:44 +00:00
|
|
|
buildInputs = [ SDL libGLU_combined ];
|
2016-05-02 23:58:02 +01:00
|
|
|
|
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";
|
|
|
|
comment = "x86 emulator with internal DOS";
|
|
|
|
desktopName = "DOSBox";
|
|
|
|
genericName = "DOS emulator";
|
|
|
|
categories = "Application;Emulator;";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2009-03-16 12:22:47 +00:00
|
|
|
|
2017-11-14 00:08:19 +00:00
|
|
|
meta = with lib; {
|
2009-03-16 12:22:47 +00:00
|
|
|
homepage = http://www.dosbox.com/;
|
|
|
|
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
|
|
|
}
|