From d5f144f4b1d265b9c14c092108918062a9e93a66 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 6 Sep 2025 14:01:03 +0200 Subject: [PATCH 1/5] xemu: 0.8.96 -> 0.8.97 Signed-off-by: Marcin Serwin --- pkgs/by-name/xe/xemu/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index 049f0987f99e..d90e3c422122 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -31,13 +31,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "xemu"; - version = "0.8.96"; + version = "0.8.97"; src = fetchFromGitHub { owner = "xemu-project"; repo = "xemu"; tag = "v${finalAttrs.version}"; - hash = "sha256-42DnlnaSWVazmct9AL1/QaVqNgYe5NCMVHRJY6axo98="; + hash = "sha256-t2hMuRiwgFjqOIfEF+QSQPHa2iDjkDUA1KBzyAieY9k="; fetchSubmodules = true; # also fetch required git submodules @@ -65,6 +65,7 @@ stdenv.mkDerivation (finalAttrs: { ++ (with python3Packages; [ python pyyaml + distlib ]); buildInputs = [ From e1675079d988e7a78ae5626f6263557da55707c8 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 6 Sep 2025 14:01:03 +0200 Subject: [PATCH 2/5] xemu: simplify icon installation loop Signed-off-by: Marcin Serwin --- pkgs/by-name/xe/xemu/package.nix | 38 +++++++++++--------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index d90e3c422122..5ade5c516c72 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -123,33 +123,21 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace ./build.ninja --replace /usr/bin/env $(which env) ''; - installPhase = - let - installIcon = resolution: '' - install -Dm644 -T ../ui/icons/xemu_${resolution}.png \ - $out/share/icons/hicolor/${resolution}/apps/xemu.png - ''; - in - '' - runHook preInstall + installPhase = '' + runHook preInstall - install -Dm755 -T qemu-system-i386 $out/bin/xemu - '' - + (lib.concatMapStringsSep "\n" installIcon [ - "16x16" - "24x24" - "32x32" - "48x48" - "128x128" - "256x256" - "512x512" - ]) - + "\n" - + '' - install -Dm644 -T ../ui/xemu.desktop $out/share/applications/xemu.desktop + install -Dm755 -T qemu-system-i386 $out/bin/xemu - runHook postInstall - ''; + for resolution in 16x16 24x24 32x32 48x48 128x128 256x256 512x512 + do + install -Dm644 -T ../ui/icons/xemu_$resolution.png \ + $out/share/icons/hicolor/$resolution/apps/xemu.png + done + + install -Dm644 -T ../ui/xemu.desktop $out/share/applications/xemu.desktop + + runHook postInstall + ''; meta = { homepage = "https://xemu.app/"; From aa84a15adfd82666f49af28c37b8f36228f569fd Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 6 Sep 2025 15:20:42 +0200 Subject: [PATCH 3/5] xemu: only fetch necessary subprojects Signed-off-by: Marcin Serwin --- pkgs/by-name/xe/xemu/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index 5ade5c516c72..58557479d259 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -4,6 +4,7 @@ SDL2_image, fetchFromGitHub, gettext, + git, glib, gtk3, cmake, @@ -37,15 +38,18 @@ stdenv.mkDerivation (finalAttrs: { owner = "xemu-project"; repo = "xemu"; tag = "v${finalAttrs.version}"; - hash = "sha256-t2hMuRiwgFjqOIfEF+QSQPHa2iDjkDUA1KBzyAieY9k="; - fetchSubmodules = true; + hash = "sha256-xx3f4khNV4CwtM9R2NQ2usDc/ScGEaZ3EbyDv1jaHtQ="; + nativeBuildInputs = [ + git + meson + ]; # also fetch required git submodules postFetch = '' cd "$out" export NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt - ${lib.getExe meson} subprojects download \ + meson subprojects download \ SPIRV-Reflect VulkanMemoryAllocator berkeley-softfloat-3 berkeley-testfloat-3 genconfig glslang imgui \ implot json keycodemapdb nv2a_vsh_cpu tomlplusplus volk xxhash || true find subprojects -type d -name .git -prune -execdir rm -r {} + From 61b14e85b00da0f96002360d656e2ca0a7f819b7 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 7 Sep 2025 12:50:29 +0200 Subject: [PATCH 4/5] xemu: only patch shebangs in scripts dir Signed-off-by: Marcin Serwin --- pkgs/by-name/xe/xemu/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index 58557479d259..9769f40f82b4 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -109,7 +109,7 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; postPatch = '' - patchShebangs . + patchShebangs scripts substituteInPlace ./scripts/xemu-version.sh \ --replace-fail 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'" From 2b052a06865a973b12231740708d7278c133a66f Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 7 Sep 2025 12:51:00 +0200 Subject: [PATCH 5/5] xemu: enable __structuredArgs Signed-off-by: Marcin Serwin --- pkgs/by-name/xe/xemu/package.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/by-name/xe/xemu/package.nix b/pkgs/by-name/xe/xemu/package.nix index 9769f40f82b4..211d180fa121 100644 --- a/pkgs/by-name/xe/xemu/package.nix +++ b/pkgs/by-name/xe/xemu/package.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { find subprojects -type d -name .git -prune -execdir rm -r {} + ''; }; - + __structuredAttrs = true; nativeBuildInputs = [ SDL2 meson @@ -158,4 +158,3 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.linux; }; }) -# TODO: investigate failure when using __structuredAttrs