From 6514b716dd560facd5841c81fe5e08eda7577d09 Mon Sep 17 00:00:00 2001 From: Zaechus Date: Sat, 19 Apr 2025 01:51:20 -0600 Subject: [PATCH] dosbox-staging: 0.81.1 -> 0.82.1 --- pkgs/by-name/do/dosbox-staging/package.nix | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/do/dosbox-staging/package.nix b/pkgs/by-name/do/dosbox-staging/package.nix index 8e482b956e9b..7aeeb8215cc3 100644 --- a/pkgs/by-name/do/dosbox-staging/package.nix +++ b/pkgs/by-name/do/dosbox-staging/package.nix @@ -1,11 +1,9 @@ { lib, SDL2, - SDL2_image, SDL2_net, alsa-lib, fetchFromGitHub, - fetchpatch, fluidsynth, gitUpdater, glib, @@ -33,23 +31,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "dosbox-staging"; - version = "0.81.1"; + version = "0.82.1"; + shortRev = "13441a2"; src = fetchFromGitHub { owner = "dosbox-staging"; repo = "dosbox-staging"; rev = "v${finalAttrs.version}"; - hash = "sha256-XGssEyX+AVv7/ixgGTRtPFjsUSX0FT0fhP+TXsFl2fY="; + hash = "sha256-BVeFBKqTQiEftWVvMkSYBjC6dCYI4juWD4A6Bx8E8/Y="; }; - patches = [ - (fetchpatch { - name = "darwin-allow-bypass-wraps.patch"; - url = "https://github.com/dosbox-staging/dosbox-staging/commit/9f0fc1dc762010e5f7471d01c504d817a066cae3.patch"; - hash = "sha256-IzxRE1Vr+M8I5hdy80UwebjJ5R1IlH9ymaYgs6VwAO4="; - }) - ]; - nativeBuildInputs = [ gtest makeWrapper @@ -60,7 +51,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 - SDL2_image SDL2_net fluidsynth glib @@ -84,8 +74,18 @@ stdenv.mkDerivation (finalAttrs: { "man" ]; + # replace instances of the get-version.sh script that uses git in meson.build with manual values + postPatch = '' + substituteInPlace meson.build \ + --replace-fail "meson.project_source_root() + '/scripts/get-version.sh'," "'printf'," \ + --replace-fail "'version', check: true," "'${finalAttrs.version}', check: true," \ + --replace-fail "'./scripts/get-version.sh', 'hash'," "'printf', '${ + builtins.substring 0 5 finalAttrs.shortRev + }'," + ''; + postInstall = '' - install -Dm644 $src/contrib/linux/dosbox-staging.desktop $out/share/applications/ + install -Dm644 $src/contrib/linux/org.dosbox-staging.dosbox-staging.desktop $out/share/applications/ ''; # Rename binary, add a wrapper, and copy manual to avoid conflict with @@ -125,6 +125,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ joshuafern + Zaechus ]; platforms = lib.platforms.unix; priority = 101;