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

47 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU_combined, libpng, graphicsmagick }:
stdenv.mkDerivation rec {
2018-11-11 03:37:00 +01:00
name = "dosbox-0.74-2";
2016-02-11 00:25:41 +01:00
src = fetchurl {
url = "mirror://sourceforge/dosbox/${name}.tar.gz";
2018-11-11 03:37:00 +01:00
sha256 = "1ksp1b5szi0vy4x55rm3j1y9wq5mlslpy8llpg87rpdyjlsk0xvh";
};
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 ];
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 = "Application;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 03:37:00 +01:00
enableParallelBuilding = true;
2017-11-14 01:08:19 +01:00
meta = with lib; {
homepage = http://www.dosbox.com/;
description = "A DOS emulator";
2017-11-14 01:08:19 +01:00
platforms = platforms.unix;
maintainers = with maintainers; [ matthewbauer ];
license = licenses.gpl2;
};
}