Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dosbox-x: init at v2023.10.06 #258301

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions pkgs/applications/emulators/dosbox-x/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{ lib
, stdenv
, fetchFromGitHub
, alsa-lib
, AudioUnit
, autoreconfHook
, Carbon
, Cocoa
, ffmpeg
, fluidsynth
, freetype
, glib
, libpcap
, libpng
, libslirp
, libxkbfile
, libXrandr
, makeWrapper
, ncurses
, pkg-config
, SDL2
, SDL2_net
, testers
, yad
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
pname = "dosbox-x";
version = "2023.10.06";

src = fetchFromGitHub {
owner = "joncampbell123";
repo = "dosbox-x";
rev = "dosbox-x-v${finalAttrs.version}";
hash = "sha256-YNYtYqcpTOx4xS/LXI53h3S+na8JVpn4w8Dhf4fWNBQ=";
};

strictDeps = true;

nativeBuildInputs = [
autoreconfHook
makeWrapper
pkg-config
];

buildInputs = [
ffmpeg
fluidsynth
freetype
glib
libpcap
libpng
libslirp
ncurses
SDL2
SDL2_net
zlib
] ++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libxkbfile
libXrandr
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
AudioUnit
Carbon
Cocoa
];

configureFlags = [ "--enable-sdl2" ];

enableParallelBuilding = true;

hardeningDisable = [ "format" ]; # https://github.com/joncampbell123/dosbox-x/issues/4436

postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/dosbox-x \
--prefix PATH : ${lib.makeBinPath [ yad ]}
'';

passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
# Version output on stderr, program returns status code 1
command = "${lib.getExe finalAttrs.finalPackage} -version 2>&1 || true";
};

meta = {
homepage = "https://dosbox-x.com";
description = "A cross-platform DOS emulator based on the DOSBox project";
longDescription = ''
DOSBox-X is an expanded fork of DOSBox with specific focus on running
Windows 3.x/9x/Me, PC-98 and 3D support via 3dfx.

The full expanded feature list is available here:
https://dosbox-x.com/wiki/DOSBox%E2%80%90X%E2%80%99s-Feature-Highlights
'';
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ hughobrien OPNA2608 ];
platforms = lib.platforms.unix;
mainProgram = "dosbox-x";
};
})
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2614,6 +2614,10 @@ with pkgs;

dosbox-staging = callPackage ../applications/emulators/dosbox-staging { };

dosbox-x = darwin.apple_sdk_11_0.callPackage ../applications/emulators/dosbox-x {
inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa;
};

duckstation = qt6Packages.callPackage ../applications/emulators/duckstation { };

dynamips = callPackage ../applications/emulators/dynamips { };
Expand Down