Loading pkgs/by-name/xe/xemu/package.nix +26 −34 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ SDL2_image, fetchFromGitHub, gettext, git, glib, gtk3, cmake, Loading Loading @@ -31,27 +32,30 @@ 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="; 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 {} + ''; }; __structuredAttrs = true; nativeBuildInputs = [ SDL2 meson Loading @@ -65,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: { ++ (with python3Packages; [ python pyyaml distlib ]); buildInputs = [ Loading Loading @@ -104,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'" Loading @@ -122,29 +127,17 @@ 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 '' installPhase = '' runHook preInstall install -Dm755 -T qemu-system-i386 $out/bin/xemu '' + (lib.concatMapStringsSep "\n" installIcon [ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) + "\n" + '' 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 Loading @@ -165,4 +158,3 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.linux; }; }) # TODO: investigate failure when using __structuredAttrs Loading
pkgs/by-name/xe/xemu/package.nix +26 −34 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ SDL2_image, fetchFromGitHub, gettext, git, glib, gtk3, cmake, Loading Loading @@ -31,27 +32,30 @@ 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="; 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 {} + ''; }; __structuredAttrs = true; nativeBuildInputs = [ SDL2 meson Loading @@ -65,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: { ++ (with python3Packages; [ python pyyaml distlib ]); buildInputs = [ Loading Loading @@ -104,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'" Loading @@ -122,29 +127,17 @@ 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 '' installPhase = '' runHook preInstall install -Dm755 -T qemu-system-i386 $out/bin/xemu '' + (lib.concatMapStringsSep "\n" installIcon [ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) + "\n" + '' 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 Loading @@ -165,4 +158,3 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.linux; }; }) # TODO: investigate failure when using __structuredAttrs