mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 08:37:40 +00:00
dosbox-staging: init @ 0.77.1
This commit is contained in:
parent
f23731c768
commit
16c2826c1a
55
pkgs/misc/emulators/dosbox-staging/default.nix
Normal file
55
pkgs/misc/emulators/dosbox-staging/default.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ stdenv, lib, fetchFromGitHub, writeShellScript
|
||||
, gtest, meson, ninja, pkgconfig
|
||||
, alsaLib, fluidsynth, libGL, libGLU, libogg, libpng, munt, opusfile, SDL2, SDL2_net
|
||||
}:
|
||||
|
||||
let
|
||||
dosbox_run = writeShellScript "dosbox" ''
|
||||
$(dirname "$0")/dosbox-staging "$@"
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "dosbox-staging";
|
||||
version = "0.77.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gtest meson ninja pkgconfig ];
|
||||
buildInputs = [ alsaLib fluidsynth libGL libGLU libogg libpng munt opusfile SDL2 SDL2_net ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
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}
|
||||
cp -r ${dosbox_run} "$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;
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user