diff --git a/pkgs/misc/emulators/dosbox/default.nix b/pkgs/misc/emulators/dosbox/default.nix index ba4f88dbcad0..383e943ff246 100644 --- a/pkgs/misc/emulators/dosbox/default.nix +++ b/pkgs/misc/emulators/dosbox/default.nix @@ -1,4 +1,16 @@ -{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU, libGL, libpng, graphicsmagick }: +{ lib +, stdenv +, fetchurl +, SDL +, SDL_net +, SDL_sound +, copyDesktopItems +, graphicsmagick +, libGL +, libGLU +, libpng +, makeDesktopItem +}: stdenv.mkDerivation rec { pname = "dosbox"; @@ -6,31 +18,40 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://sourceforge/dosbox/dosbox-${version}.tar.gz"; - sha256 = "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0"; + hash = "sha256-wNE91+0u02O2jeYVR1eB6JHNWC6BYrXDZpE3UCIiJgo="; }; + nativeBuildInputs = [ + copyDesktopItems + graphicsmagick + ]; + + buildInputs = [ + SDL + SDL_net + SDL_sound + libGL + libGLU + libpng + ]; + hardeningDisable = [ "format" ]; - 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;"; - }; + desktopItems = [ + (makeDesktopItem { + name = "dosbox"; + exec = "dosbox"; + icon = "dosbox"; + comment = "x86 dos emulator"; + desktopName = "DOSBox"; + genericName = "DOS emulator"; + categories = "Emulator;Game;"; + }) + ]; 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 ''; @@ -40,8 +61,15 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://www.dosbox.com/"; description = "A DOS emulator"; - platforms = platforms.unix; + longDescription = '' + DOSBox is an emulator that recreates a MS-DOS compatible environment + (complete with Sound, Input, Graphics and even basic networking). This + environment is complete enough to run many classic MS-DOS games completely + unmodified. In order to utilize all of DOSBox's features you need to first + understand some basic concepts about the MS-DOS environment. + ''; + license = licenses.gpl2Plus; maintainers = with maintainers; [ matthewbauer ]; - license = licenses.gpl2; + platforms = platforms.unix; }; }