2021-06-28 23:13:55 +00:00
|
|
|
{ alsa-lib
|
2020-12-03 08:41:04 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, makeWrapper
|
2020-12-03 08:41:04 +00:00
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, rustPlatform
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2020-12-03 08:41:04 +00:00
|
|
|
, wayland
|
|
|
|
, xorg
|
2021-02-05 17:12:51 +00:00
|
|
|
, vulkan-loader
|
2022-09-30 11:47:45 +00:00
|
|
|
, jre_minimal
|
|
|
|
, cairo
|
|
|
|
, gtk3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, glib
|
2024-02-29 20:09:43 +00:00
|
|
|
, libxkbcommon
|
2020-12-03 08:41:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ruffle";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "nightly-2024-02-09";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ruffle-rs";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-C4wfR5io0FBFmNfYHlE/v81jQAb0SEoaCzI6tenRYGg=";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
glib
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
jre_minimal
|
2021-02-05 17:12:51 +00:00
|
|
|
makeWrapper
|
2020-12-03 08:41:04 +00:00
|
|
|
pkg-config
|
|
|
|
python3
|
2022-09-30 11:47:45 +00:00
|
|
|
wrapGAppsHook
|
2020-12-03 08:41:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2022-09-30 11:47:45 +00:00
|
|
|
cairo
|
|
|
|
gtk3
|
2020-12-03 08:41:04 +00:00
|
|
|
openssl
|
|
|
|
wayland
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libXrender
|
2021-02-05 17:12:51 +00:00
|
|
|
vulkan-loader
|
2020-12-03 08:41:04 +00:00
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
preFixup = ''
|
|
|
|
patchelf $out/bin/ruffle_desktop \
|
|
|
|
--add-needed libxkbcommon-x11.so \
|
|
|
|
--add-rpath ${libxkbcommon}/lib
|
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postFixup = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
# This name is too generic
|
|
|
|
mv $out/bin/exporter $out/bin/ruffle_exporter
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
vulkanWrapperArgs+=(
|
|
|
|
--prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
wrapProgram $out/bin/ruffle_exporter \
|
|
|
|
"''${vulkanWrapperArgs[@]}"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/ruffle_desktop \
|
|
|
|
"''${vulkanWrapperArgs[@]}" \
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoBuildFlags = [ "--workspace" ];
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-02-29 20:09:43 +00:00
|
|
|
"flash-lso-0.6.0" = "sha256-SHWIOVp3MGIATKDKAGNWG3B3jX3a0jDE2c8bt7NptrE=";
|
|
|
|
"h263-rs-0.1.0" = "sha256-Akf1SBjo8qikhiHI8NPvO3vJvVfm0dQBf2X9V7OdgQc=";
|
|
|
|
"jpegxr-0.3.0" = "sha256-jirUbse2MiUDCmwBO7ykWNKHgDgL/6ZM5o2HeDUhm0c=";
|
2023-03-27 19:17:25 +00:00
|
|
|
"nellymoser-rs-0.1.2" = "sha256-GykDQc1XwySOqfxW/OcSxkKCFJyVmwSLy/CEBcwcZJs=";
|
2024-02-29 20:09:43 +00:00
|
|
|
"nihav_codec_support-0.1.0" = "sha256-HAJS4I6yyzQzCf+vmaFp1MWXpcUgFAHPxLhfMVXmN1c=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "An Adobe Flash Player emulator written in the Rust programming language";
|
2020-12-03 08:41:04 +00:00
|
|
|
homepage = "https://ruffle.rs/";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ govanify jchw ];
|
2020-12-03 08:41:04 +00:00
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ruffle_desktop";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
}
|