ruffle: nightly-2025-01-25 -> nightly-2025-03-28 (#384323)

authored by Gaétan Lepage and committed by GitHub a856c2a0 da0462d8

+81 -138
+81 -86
pkgs/by-name/ru/ruffle/package.nix
··· 1 1 { 2 + lib, 3 + stdenvNoCC, 4 + rustPlatform, 5 + withRuffleTools ? false, 6 + fetchFromGitHub, 7 + jre_minimal, 8 + pkg-config, 9 + wrapGAppsHook3, 10 + darwin, 2 11 alsa-lib, 3 - fetchFromGitHub, 4 - makeWrapper, 12 + gtk3, 5 13 openssl, 6 - pkg-config, 7 - python3, 8 - rustPlatform, 9 - stdenvNoCC, 10 - lib, 11 14 wayland, 12 - xorg, 13 15 vulkan-loader, 14 16 udev, 15 - jre_minimal, 16 - cairo, 17 - gtk3, 18 - wrapGAppsHook3, 19 - gsettings-desktop-schemas, 20 - glib, 21 17 libxkbcommon, 22 18 openh264, 23 - darwin, 19 + writeShellApplication, 20 + curl, 21 + jq, 22 + nix-update, 24 23 }: 25 - let 24 + rustPlatform.buildRustPackage (finalAttrs: { 26 25 pname = "ruffle"; 27 - version = "nightly-2025-01-25"; 28 - # TODO: Remove overridden derivation once ruffle accepts upstream openh264-2.5.0 29 - openh264-241 = 30 - if stdenvNoCC.hostPlatform.isLinux then 31 - openh264.overrideAttrs (_: rec { 32 - version = "2.4.1"; 33 - src = fetchFromGitHub { 34 - owner = "cisco"; 35 - repo = "openh264"; 36 - tag = "v${version}"; 37 - hash = "sha256-ai7lcGcQQqpsLGSwHkSs7YAoEfGCIbxdClO6JpGA+MI="; 38 - }; 39 - postPatch = null; 40 - }) 41 - else 42 - null; 43 - in 44 - rustPlatform.buildRustPackage { 45 - inherit pname version; 26 + version = "0-nightly-2025-03-28"; 46 27 47 28 src = fetchFromGitHub { 48 29 owner = "ruffle-rs"; 49 - repo = pname; 50 - tag = version; 51 - hash = "sha256-JLh0tatP70rYo2QXLKu6M9jJ1gFpY76sYaUJqW9U4E0="; 30 + repo = "ruffle"; 31 + tag = lib.strings.removePrefix "0-" finalAttrs.version; 32 + hash = "sha256-p2EEoHXseIXms4Xjyi3aNWCU0W9slXkeqrCrPvq1BjI="; 52 33 }; 53 34 54 - patches = [ ./remove-deterministic-feature.patch ]; 55 - 56 35 useFetchCargoVendor = true; 57 - cargoHash = "sha256-PbNp/V+xmU6Lo24a6pd9XoT/LQmINztjOHKoikG9N4Y="; 36 + cargoHash = "sha256-RcCIt6xVZaQA7eSgKngHtsGafHFwv1bISK0XKWoNWtI="; 37 + cargoBuildFlags = lib.optional withRuffleTools "--workspace"; 38 + 39 + env = 40 + let 41 + tag = lib.strings.removePrefix "0-" finalAttrs.version; 42 + versionDate = lib.strings.removePrefix "0-nightly-" finalAttrs.version; 43 + in 44 + { 45 + VERGEN_IDEMPOTENT = "1"; 46 + VERGEN_GIT_SHA = tag; 47 + VERGEN_GIT_COMMIT_DATE = versionDate; 48 + VERGEN_GIT_COMMIT_TIMESTAMP = "${versionDate}T00:00:00Z"; 49 + }; 58 50 59 51 nativeBuildInputs = 60 52 [ jre_minimal ] 61 53 ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ 62 - glib 63 - gsettings-desktop-schemas 64 - makeWrapper 65 54 pkg-config 66 - python3 67 55 wrapGAppsHook3 68 56 ] 69 57 ++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [ rustPlatform.bindgenHook ]; ··· 71 59 buildInputs = 72 60 lib.optionals stdenvNoCC.hostPlatform.isLinux [ 73 61 alsa-lib 74 - cairo 75 62 gtk3 76 63 openssl 77 64 wayland 78 - xorg.libX11 79 - xorg.libXcursor 80 - xorg.libXi 81 - xorg.libxcb 82 - xorg.libXrender 83 65 vulkan-loader 84 66 udev 85 67 ] 86 68 ++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]; 87 69 88 - cargoBuildFlags = [ "--workspace" ]; 89 - 90 70 postInstall = 91 71 '' 92 - # Namespace binaries with "ruffle_" 93 - mv $out/bin/exporter $out/bin/ruffle_exporter 94 - mv $out/bin/mocket $out/bin/ruffle_mocket 95 - mv $out/bin/stub-report $out/bin/ruffle_stub-report 96 - mv $out/bin/build_playerglobal $out/bin/ruffle_build_playerglobal 97 - 98 - # This name is too specific 99 72 mv $out/bin/ruffle_desktop $out/bin/ruffle 73 + install -Dm644 LICENSE.md -t $out/share/doc/ruffle 74 + install -Dm644 README.md -t $out/share/doc/ruffle 100 75 '' 101 76 + lib.optionalString stdenvNoCC.hostPlatform.isLinux '' 102 77 install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.desktop \ ··· 107 82 108 83 install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.metainfo.xml \ 109 84 -t $out/share/metainfo/ 110 - 111 - rm $out/bin/ruffle_web_safari 112 85 ''; 113 86 87 + # Prevents ruffle from downloading openh264 at runtime for Linux 88 + openh264-241 = 89 + if stdenvNoCC.hostPlatform.isLinux then 90 + openh264.overrideAttrs (_: rec { 91 + version = "2.4.1"; 92 + src = fetchFromGitHub { 93 + owner = "cisco"; 94 + repo = "openh264"; 95 + tag = "v${version}"; 96 + hash = "sha256-ai7lcGcQQqpsLGSwHkSs7YAoEfGCIbxdClO6JpGA+MI="; 97 + }; 98 + postPatch = null; 99 + }) 100 + else 101 + null; 102 + 114 103 preFixup = lib.optionalString stdenvNoCC.hostPlatform.isLinux '' 115 - patchelf $out/bin/ruffle \ 116 - --add-needed libxkbcommon-x11.so \ 117 - --add-needed libwayland-client.so \ 118 - --add-needed libopenh264.so \ 119 - --add-rpath ${libxkbcommon}/lib:${wayland}/lib:${openh264-241}/lib 104 + gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${ 105 + lib.makeLibraryPath [ 106 + libxkbcommon 107 + finalAttrs.openh264-241 108 + vulkan-loader 109 + wayland 110 + ] 111 + }) 120 112 ''; 121 113 122 - dontWrapGApps = true; 123 - 124 - postFixup = lib.optionalString stdenvNoCC.hostPlatform.isLinux '' 125 - vulkanWrapperArgs+=( 126 - --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib 127 - ) 128 - 129 - wrapProgram $out/bin/ruffle_exporter \ 130 - "''${vulkanWrapperArgs[@]}" 131 - 132 - wrapProgram $out/bin/ruffle \ 133 - "''${vulkanWrapperArgs[@]}" \ 134 - "''${gappsWrapperArgs[@]}" 135 - ''; 114 + passthru = { 115 + updateScript = lib.getExe (writeShellApplication { 116 + name = "ruffle-update"; 117 + runtimeInputs = [ 118 + curl 119 + jq 120 + nix-update 121 + ]; 122 + text = '' 123 + version="$( \ 124 + curl https://api.github.com/repos/ruffle-rs/ruffle/releases?per_page=1 | \ 125 + jq -r ".[0].tag_name" \ 126 + )" 127 + exec nix-update --version "0-$version" ruffle 128 + ''; 129 + }); 130 + }; 136 131 137 132 meta = { 138 133 description = "Cross platform Adobe Flash Player emulator"; ··· 142 137 and 3 programs with machine-native performance thanks to being 143 138 written in the Rust programming language. 144 139 145 - This package for ruffle also includes the `exporter` and 146 - `scanner` utilities which allow for generating screenshots as 147 - PNGs and parsing `.swf` files in bulk respectively. 140 + Additionally, overriding the `withRuffleTools` input to 141 + `true` will build all the available packages in the ruffle 142 + project, including the `exporter` and `scanner` utilities. 148 143 ''; 149 144 homepage = "https://ruffle.rs/"; 150 145 downloadPage = "https://ruffle.rs/downloads"; 151 - changelog = "https://github.com/ruffle-rs/ruffle/releases/tag/${version}"; 146 + changelog = "https://github.com/ruffle-rs/ruffle/releases/tag/${lib.strings.removePrefix "0-" finalAttrs.version}"; 152 147 license = [ 153 148 lib.licenses.mit 154 149 lib.licenses.asl20 ··· 160 155 mainProgram = "ruffle"; 161 156 platforms = lib.platforms.linux ++ lib.platforms.darwin; 162 157 }; 163 - } 158 + })
-52
pkgs/by-name/ru/ruffle/remove-deterministic-feature.patch
··· 1 - diff --git a/exporter/Cargo.toml b/exporter/Cargo.toml 2 - index 93066a30d..0f8b71ae4 100644 3 - --- a/exporter/Cargo.toml 4 - +++ b/exporter/Cargo.toml 5 - @@ -13,7 +13,7 @@ workspace = true 6 - [dependencies] 7 - clap = { workspace = true } 8 - futures = { workspace = true } 9 - -ruffle_core = { path = "../core", features = ["deterministic", "default_font"] } 10 - +ruffle_core = { path = "../core", features = ["default_font"] } 11 - ruffle_render_wgpu = { path = "../render/wgpu", features = ["clap"] } 12 - image = { workspace = true, features = ["png"] } 13 - walkdir = { workspace = true } 14 - diff --git a/scanner/Cargo.toml b/scanner/Cargo.toml 15 - index 59781ba79..40cf54c24 100644 16 - --- a/scanner/Cargo.toml 17 - +++ b/scanner/Cargo.toml 18 - @@ -12,7 +12,7 @@ workspace = true 19 - 20 - [dependencies] 21 - clap = { workspace = true } 22 - -ruffle_core = { path = "../core", features = ["deterministic"] } 23 - +ruffle_core = { path = "../core" } 24 - log = { workspace = true } 25 - walkdir = { workspace = true } 26 - serde = { workspace = true, features = ["derive"] } 27 - diff --git a/tests/Cargo.toml b/tests/Cargo.toml 28 - index 26bfc9a89..b7342b662 100644 29 - --- a/tests/Cargo.toml 30 - +++ b/tests/Cargo.toml 31 - @@ -27,7 +27,7 @@ ruffle_render_wgpu = { path = "../render/wgpu", optional = true } 32 - regex = "1.11.1" 33 - 34 - [dev-dependencies] 35 - -ruffle_core = { path = "../core", features = ["deterministic", "timeline_debug", "avm_debug", "audio", "mp3", "aac", "default_font", "test_only_as3"] } 36 - +ruffle_core = { path = "../core", features = ["timeline_debug", "avm_debug", "audio", "mp3", "aac", "default_font", "test_only_as3"] } 37 - ruffle_test_framework = { path = "framework" } 38 - libtest-mimic = "0.8.1" 39 - walkdir = { workspace = true } 40 - diff --git a/tests/framework/Cargo.toml b/tests/framework/Cargo.toml 41 - index ffc59e25b..639028578 100644 42 - --- a/tests/framework/Cargo.toml 43 - +++ b/tests/framework/Cargo.toml 44 - @@ -11,7 +11,7 @@ version.workspace = true 45 - workspace = true 46 - 47 - [dependencies] 48 - -ruffle_core = { path = "../../core", features = ["deterministic", "timeline_debug", "avm_debug", "audio", "mp3", "aac", "default_font", "serde"] } 49 - +ruffle_core = { path = "../../core", features = ["timeline_debug", "avm_debug", "audio", "mp3", "aac", "default_font", "serde"] } 50 - ruffle_render = { path = "../../render", features = ["serde"] } 51 - ruffle_input_format = { path = "../input-format" } 52 - ruffle_socket_format = { path = "../socket-format" }