From 1d72b7345fdd8ed9522535d0c61db9713019f5d6 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Fri, 28 Jul 2017 11:20:56 +0300 Subject: [PATCH] dosbox-unstable: init at 2017-07-02 As current stable version segfaults when playing HoMM2, as described at https://www.reddit.com/r/linux_gaming/comments/4dxfei/dosbox_segmentation_fault_core_dumped/ Also some missing dependencies (compared to stable version) were added: - SDL_sound - for mounting .cue files with compressed sound - SDL_net - for IPX support - libpng - for making screenshots --- lib/maintainers.nix | 1 + pkgs/misc/emulators/dosbox/unstable.nix | 39 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 41 insertions(+) create mode 100644 pkgs/misc/emulators/dosbox/unstable.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index fc558b64abdb..312990060832 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -75,6 +75,7 @@ berdario = "Dario Bertini "; bergey = "Daniel Bergey "; bhipple = "Benjamin Hipple "; + binarin = "Alexey Lebedeff "; bjg = "Brian Gough "; bjornfor = "Bjørn Forsman "; bluescreen303 = "Mathijs Kwik "; diff --git a/pkgs/misc/emulators/dosbox/unstable.nix b/pkgs/misc/emulators/dosbox/unstable.nix new file mode 100644 index 000000000000..95d03c425e35 --- /dev/null +++ b/pkgs/misc/emulators/dosbox/unstable.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, fetchsvn, SDL, SDL_net, SDL_sound, libpng, makeDesktopItem, mesa, autoreconfHook }: + +let revision = "4025"; + revisionDate = "2017-07-02"; + revisionSha = "0hbghdlvm6qibp0df35qxq35km4nza3sm301x380ghamxq2vgy6a"; +in stdenv.mkDerivation rec { + name = "dosbox-unstable-${revisionDate}"; + + src = fetchsvn { + url = "https://dosbox.svn.sourceforge.net/svnroot/dosbox/dosbox/trunk"; + rev = revision; + sha256 = revisionSha; + }; + + hardeningDisable = [ "format" ]; + + buildInputs = [ SDL SDL_net SDL_sound libpng mesa autoreconfHook ]; + + desktopItem = makeDesktopItem { + name = "dosbox"; + exec = "dosbox"; + comment = "x86 emulator with internal DOS"; + desktopName = "DOSBox (SVN)"; + genericName = "DOS emulator"; + categories = "Application;Emulator;"; + }; + + postInstall = '' + mkdir -p $out/share/applications + cp ${desktopItem}/share/applications/* $out/share/applications + ''; + + meta = { + homepage = http://www.dosbox.com/; + description = "A DOS emulator"; + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ binarin ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7aaddf8a643c..e890a4ba197b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18537,6 +18537,7 @@ with pkgs; dell-530cdn = callPackage ../misc/drivers/dell-530cdn {}; dosbox = callPackage ../misc/emulators/dosbox { }; + dosbox-unstable = callPackage ../misc/emulators/dosbox/unstable.nix { }; dpkg = callPackage ../tools/package-management/dpkg { };