nixpkgs/pkgs/misc/emulators/dosbox/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2019-11-10 16:44:34 +00:00
{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU, libGL, libpng, graphicsmagick }:
stdenv.mkDerivation rec {
name = "dosbox-0.74-3";
2016-02-10 23:25:41 +00:00
src = fetchurl {
url = "mirror://sourceforge/dosbox/${name}.tar.gz";
sha256 = "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0";
};
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 ];
nativeBuildInputs = [ graphicsmagick ];
configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
desktopItem = makeDesktopItem {
name = "dosbox";
exec = "dosbox";
icon = "dosbox";
comment = "x86 emulator with internal DOS";
desktopName = "DOSBox";
genericName = "DOS emulator";
categories = "Emulator;";
};
postInstall = ''
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
mkdir -p $out/share/icons/hicolor/256x256/apps
gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
'';
2018-11-11 02:37:00 +00:00
enableParallelBuilding = true;
2017-11-14 00:08:19 +00:00
meta = with lib; {
homepage = "http://www.dosbox.com/";
description = "A DOS emulator";
2017-11-14 00:08:19 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ matthewbauer ];
license = licenses.gpl2;
};
}