Skip to content

Commit 464c8ec

Browse files
committed
dosbox-x: init at v2023.10.06
1 parent 1f0e8ac commit 464c8ec

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{ lib
2+
, stdenv
3+
, fetchFromGitHub
4+
, alsa-lib
5+
, AudioUnit
6+
, autoreconfHook
7+
, Carbon
8+
, Cocoa
9+
, ffmpeg
10+
, fluidsynth
11+
, freetype
12+
, glib
13+
, libpcap
14+
, libpng
15+
, libslirp
16+
, libxkbfile
17+
, libXrandr
18+
, makeWrapper
19+
, ncurses
20+
, pkg-config
21+
, SDL2
22+
, SDL2_net
23+
, testers
24+
, yad
25+
, zlib
26+
}:
27+
28+
stdenv.mkDerivation (finalAttrs: {
29+
pname = "dosbox-x";
30+
version = "2023.10.06";
31+
32+
src = fetchFromGitHub {
33+
owner = "joncampbell123";
34+
repo = "dosbox-x";
35+
rev = "dosbox-x-v${finalAttrs.version}";
36+
hash = "sha256-YNYtYqcpTOx4xS/LXI53h3S+na8JVpn4w8Dhf4fWNBQ=";
37+
};
38+
39+
strictDeps = true;
40+
41+
nativeBuildInputs = [
42+
autoreconfHook
43+
makeWrapper
44+
pkg-config
45+
];
46+
47+
buildInputs = [
48+
ffmpeg
49+
fluidsynth
50+
freetype
51+
glib
52+
libpcap
53+
libpng
54+
libslirp
55+
ncurses
56+
SDL2
57+
SDL2_net
58+
zlib
59+
] ++ lib.optionals stdenv.hostPlatform.isLinux [
60+
alsa-lib
61+
libxkbfile
62+
libXrandr
63+
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
64+
AudioUnit
65+
Carbon
66+
Cocoa
67+
];
68+
69+
configureFlags = [ "--enable-sdl2" ];
70+
71+
enableParallelBuilding = true;
72+
73+
hardeningDisable = [ "format" ]; # https://github.com/joncampbell123/dosbox-x/issues/4436
74+
75+
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
76+
wrapProgram $out/bin/dosbox-x \
77+
--prefix PATH : ${lib.makeBinPath [ yad ]}
78+
'';
79+
80+
passthru.tests.version = testers.testVersion {
81+
package = finalAttrs.finalPackage;
82+
# Version output on stderr, program returns status code 1
83+
command = "${lib.getExe finalAttrs.finalPackage} -version 2>&1 || true";
84+
};
85+
86+
meta = {
87+
homepage = "https://dosbox-x.com";
88+
description = "A cross-platform DOS emulator based on the DOSBox project";
89+
longDescription = ''
90+
DOSBox-X is an expanded fork of DOSBox with specific focus on running
91+
Windows 3.x/9x/Me, PC-98 and 3D support via 3dfx.
92+
93+
The full expanded feature list is available here:
94+
https://dosbox-x.com/wiki/DOSBox%E2%80%90X%E2%80%99s-Feature-Highlights
95+
'';
96+
license = lib.licenses.gpl2Plus;
97+
maintainers = with lib.maintainers; [ hughobrien OPNA2608 ];
98+
platforms = lib.platforms.unix;
99+
mainProgram = "dosbox-x";
100+
};
101+
})

pkgs/top-level/all-packages.nix

+4
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,10 @@ with pkgs;
26142614

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

2617+
dosbox-x = darwin.apple_sdk_11_0.callPackage ../applications/emulators/dosbox-x {
2618+
inherit (darwin.apple_sdk_11_0.frameworks) AudioUnit Carbon Cocoa;
2619+
};
2620+
26172621
duckstation = qt6Packages.callPackage ../applications/emulators/duckstation { };
26182622

26192623
dynamips = callPackage ../applications/emulators/dynamips { };

0 commit comments

Comments
 (0)