Merge pull request #322653 from atorres1985-contrib/dosbox-staging

dosbox-staging: refactor
This commit is contained in:
❄️
2024-06-28 09:30:53 -03:00
committed by GitHub
+29 -17
View File
@@ -1,14 +1,14 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
SDL2,
SDL2_image,
SDL2_net,
alsa-lib,
darwin,
fetchFromGitHub,
fetchpatch,
fluidsynth,
gitUpdater,
glib,
gtest,
iir1,
@@ -18,7 +18,6 @@
libmt32emu,
libogg,
libpng,
zlib-ng,
libpulseaudio,
libslirp,
libsndfile,
@@ -28,7 +27,9 @@
opusfile,
pkg-config,
speexdsp,
nix-update-script,
stdenv,
testers,
zlib-ng,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -60,6 +61,9 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs =
[
SDL2
SDL2_image
SDL2_net
fluidsynth
glib
iir1
@@ -69,15 +73,12 @@ stdenv.mkDerivation (finalAttrs: {
libmt32emu
libogg
libpng
zlib-ng
libpulseaudio
libslirp
libsndfile
opusfile
SDL2
SDL2_image
SDL2_net
speexdsp
zlib-ng
]
++ lib.optionals stdenv.isLinux [ alsa-lib ]
++ lib.optionals stdenv.isDarwin (
@@ -89,29 +90,40 @@ stdenv.mkDerivation (finalAttrs: {
]
);
outputs = [ "out" "man" ];
postInstall = ''
install -Dm644 $src/contrib/linux/dosbox-staging.desktop $out/share/applications/
'';
# Rename binary, add a wrapper, and copy manual to avoid conflict with
# original 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.
postFixup = ''
# Rename binary, add a wrapper, and copy manual to avoid conflict with
# original 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/dosbox-staging
makeWrapper $out/bin/dosbox-staging $out/bin/dosbox
# Create a symlink to dosbox manual instead of copying it
pushd $out/share/man/man1/
pushd $man/share/man/man1/
ln -s dosbox.1.gz dosbox-staging.1.gz
popd
'';
passthru.updateScript = nix-update-script { };
passthru = {
tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "dosbox --version";
};
};
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = {
homepage = "https://dosbox-staging.github.io/";
description = "Modernized DOS emulator";
description = "Modernized DOS emulator; DOSBox fork";
longDescription = ''
DOSBox Staging is an attempt to revitalize DOSBox's development
process. It's not a rewrite, but a continuation and improvement on the