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-staging: init at 0.77.1 #141044

Merged
merged 5 commits into from Oct 24, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions pkgs/misc/emulators/dosbox-staging/default.nix
@@ -0,0 +1,49 @@
{ lib, fetchFromGitHub, stdenv
, gtest, makeWrapper, meson, ninja, pkg-config
, alsa-lib, fluidsynth, libGL, libGLU, libogg, libpng, munt, opusfile, SDL2, SDL2_net
}:

stdenv.mkDerivation rec {
pname = "dosbox-staging";
version = "0.77.1";

src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x";
};

nativeBuildInputs = [ gtest makeWrapper meson ninja pkg-config ];
buildInputs = [ alsa-lib fluidsynth libGL libGLU libogg libpng munt opusfile SDL2 SDL2_net ];

hardeningDisable = [ "format" ];

mesonFlags = [
"--buildtype=release"
"-Ddefault_library=static"
"-Db_asneeded=true"
"-Dtry_static_libs=png"
"-Dfluidsynth:enable-floats=true"
"-Dfluidsynth:try-static-deps=true"
];

postFixup = ''
# Rename binary, add a wrapper, and copy manual to avoid conflict with vanilla dosbox.
# Doing it this way allows us to work with frontends and launchers that expect the
# binary to be named dosbox, but get out of the way of vanilla dosbox if the user
# desires to install that as well.
mv $out/bin/dosbox $out/bin/${pname}
makeWrapper $out/bin/dosbox-staging $out/bin/dosbox
cp $out/share/man/man1/dosbox.1.gz $out/share/man/man1/${pname}.1.gz
'';

meta = with lib; {
description = "A modernized DOS emulator";
homepage = "https://dosbox-staging.github.io/";
license = licenses.gpl2;
maintainers = with maintainers; [ joshuafern ];
platforms = platforms.unix;
priority = 101;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -31617,6 +31617,8 @@ with pkgs;

dosbox = callPackage ../misc/emulators/dosbox { };

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

emu2 = callPackage ../misc/emulators/emu2 { };

apt = callPackage ../tools/package-management/apt { };
Expand Down