matt1432
d230f9fabe
All checks were successful
Discord / discord commits (push) Has been skipped
Flake inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/012ca035ff0e7eb8d8663674645e00f8cea5757e?narHash=sha256-A1gms/3YZLz%2B6E2RQoR/aCRApz6imSy9KOlct8QY1hs%3D' (2024-07-09) → 'github:matt1432/discord-nightly-overlay/94cb9dac116b1038d65f7733c8a88d9139a6f773?narHash=sha256-mnFt2qx1hgYEV5Brimp/swrbyl8zlm0NO55Q%2BUqBGtk%3D' (2024-07-11) • Updated input 'discord-overlay/Vencord-src': 'github:Vendicated/vencord/02092a985c2f95f2f265387a849db8cec95742a8?narHash=sha256-i7UqEjdV6%2BkeocA8jkZsLYKEYew8luJqYn7CS5cgF7w%3D' (2024-07-06) → 'github:Vendicated/vencord/9f8c7494216b3d5aadb8d3fec14fa5ac7d8f448a?narHash=sha256-uZQkPqIYcy7ESnCADR7lpjNQL3C1tcqZcgpwioDbb5o%3D' (2024-07-10) • Updated input 'home-manager': 'github:nix-community/home-manager/2fb5c1e0a17bc6059fa09dc411a43d75f35bb192?narHash=sha256-7ftA4Bv5KfH4QdTRxqe8/Hz2YTKo%2B7IQ9n7vbNWgv28%3D' (2024-07-08) → 'github:nix-community/home-manager/c085b984ff2808bf322f375b10fea5a415a9c43d?narHash=sha256-BivO5yIQukDlJL%2B1875Sqf3GuOPxZDdA48dYDi3PkL8%3D' (2024-07-10) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/5d1928b925da7390eae3e369e6808d64cf916ed7?narHash=sha256-rw8s4EsRSVtlAGNd5ttO4Ynb/eq0rMJsqG9zyREK3sk%3D' (2024-07-08) → 'github:Jovian-Experiments/Jovian-NixOS/6f9390004b18e8b9be7863ab6506a038129e4f06?narHash=sha256-DPP3lWzpRxEETzlYbfvQVmIse/ZKWqLkDAFkvu4XRl4%3D' (2024-07-10) • Updated input 'neovim-nightly': 'github:nix-community/neovim-nightly-overlay/b6b51915180e6d2eac488d6f882e4ba36bad380d?narHash=sha256-IG/g4l/W0R2M/jxEyu/Sl3BmR/OK5D1jiahpc0wlpvE%3D' (2024-07-09) → 'github:nix-community/neovim-nightly-overlay/ec4631892b2515261158b1b12900758a9eb5a660?narHash=sha256-x%2Bg48Jl5De2oOfFazKbEP8IabXaeAKmF3JLcQyADYvE%3D' (2024-07-10) • Updated input 'neovim-nightly/git-hooks': 'github:cachix/git-hooks.nix/2b6bd3c87d3a66fb0b8f2f06c985995e04b4fb96?narHash=sha256-1in42htN3g3MnE3/AO5Qgs6pMWUzmtPQ7s675brO8uw%3D' (2024-07-08) → 'github:cachix/git-hooks.nix/8d6a17d0cdf411c55f12602624df6368ad86fac1?narHash=sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY%3D' (2024-07-09) • Updated input 'neovim-nightly/neovim-src': 'github:neovim/neovim/fb6c059dc55c8d594102937be4dd70f5ff51614a?narHash=sha256-66u%2Byzjk6NrFr2jj2svD3jwNX8P2B8/DNH9A51V4kh8%3D' (2024-07-08) → 'github:neovim/neovim/f3c7fb9db176f32606e83eb47cc7549300191d2f?narHash=sha256-1rWj8M6J/pd4NtNJlnucdteZ%2BYzSIA5YJVdk/T2ssfo%3D' (2024-07-09) • Updated input 'nix-on-droid': 'github:nix-community/nix-on-droid/f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25?narHash=sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q%3D' (2024-07-07) → 'github:nix-community/nix-on-droid/8bcadcef69dcb5ca177bfb6ea3dc6b092cda2b06?narHash=sha256-WbjV0gmnh6jG1B292K4KIJwtBacn2sTWhiw1ZMeti9s%3D' (2024-07-10) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/655a58a72a6601292512670343087c2d75d859c1?narHash=sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU%3D' (2024-07-08) → 'github:NixOS/nixpkgs/feb2849fdeb70028c70d73b848214b00d324a497?narHash=sha256-ZgnNHuKV6h2%2BfQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ%3D' (2024-07-09) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/813f608e25bc14b16053c005b05ebf8b18d25503?narHash=sha256-05wIPweI6ts1BtVaMYbdL5KEelMfM4g5f/Z/xQzXRQI%3D' (2024-07-08) → 'github:nix-community/nixpkgs-wayland/8f132445454c6b9f0b21952953885007b961310a?narHash=sha256-r0a7rtlx5GzJ57izpq58B30sAzSIH2V/ctwIsMV51rY%3D' (2024-07-11) • Updated input 'pcsd': 'github:matt1432/nixos-pcsd/f9a452d33a0c02d6aecb15d330c9bb91b3f3b11e?narHash=sha256-b1IcFAJpwQNb/761B2Ohq02tTlNtDhKihX1wpQY8Qic%3D' (2024-07-07) → 'github:matt1432/nixos-pcsd/797d947767101781497a1e1b869f27d449e2a7c2?narHash=sha256-MFbEMQu%2BvlWYzRPYrEANm02PWkRSgkJkaHuSVIyIEzM%3D' (2024-07-11) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:01f8359d5e1bbb7aa614acffebf81bea6ffce4f9fb9e57872466df381103a4bd → sha256:a6d70b4df97eab6b52ee7094c80109b28c0c2e8d9066c60b71b3222e88726444 • ghcr.io/immich-app/immich-server v1.108.0: sha256:75746006b35a7bc61408cd4d124dc73344f0a087c2d9769c4715ca84a1d87591 → sha256:248a6da7dadeb57f90eacd5635ecc65e63d4c3646a6c94a362bb57cba1b314fa • ghcr.io/immich-app/immich-machine-learning v1.108.0: sha256:f22d949f5f3e16d1c3dcf0aa3ca5f7a73f053b51d2883ac864f9742d3053576b → sha256:4dc544396bf08cd92066f83a270155201d80512add127ca9fac2d3e56694d2a4 • ghcr.io/linuxserver/calibre latest: sha256:ab3c6fb537e1b3085963c7407a4971e7e535812341eb65b10b42691389697292 → sha256:4e886252cad4a7796289a737afb4b47e9b547b7e2d2b9e35fd3153c8f97eefca • ghcr.io/linuxserver/sabnzbd latest: sha256:db76abdcd65ba2c06a630d17d7e71e75245f8c7ace734d4cadd6402e2776ad5c → sha256:cd0e0de27454b040a0d55d1a06885dc78366435ce6794b82a6e4194b795e213a
182 lines
4.5 KiB
Nix
182 lines
4.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
wrapQtAppsHook,
|
|
autoconf,
|
|
boost,
|
|
catch2_3,
|
|
cmake,
|
|
compat-list,
|
|
cpp-jwt,
|
|
cubeb,
|
|
discord-rpc,
|
|
enet,
|
|
fmt,
|
|
glslang,
|
|
libopus,
|
|
libusb1,
|
|
libva,
|
|
lz4,
|
|
nlohmann_json,
|
|
nv-codec-headers-12,
|
|
nx_tzdb,
|
|
pkg-config,
|
|
qtbase,
|
|
qtmultimedia,
|
|
qttools,
|
|
qtwayland,
|
|
qtwebengine,
|
|
SDL2,
|
|
vulkan-headers,
|
|
vulkan-loader,
|
|
yasm,
|
|
zlib,
|
|
zstd,
|
|
...
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "yuzu";
|
|
version = "1727";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yuzu-emu";
|
|
repo = "yuzu-mainline";
|
|
rev = "mainline-0-${finalAttrs.version}";
|
|
hash = "sha256-DKIVXy3OGUfdw/mZtPzom40KU51CvXaV+KqRjQseDyk=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
glslang
|
|
pkg-config
|
|
qttools
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
# vulkan-headers must come first, so the older propagated versions
|
|
# don't get picked up by accident
|
|
vulkan-headers
|
|
|
|
boost
|
|
catch2_3
|
|
cpp-jwt
|
|
cubeb
|
|
discord-rpc
|
|
# intentionally omitted: dynarmic - prefer vendored version for compatibility
|
|
enet
|
|
|
|
# vendored ffmpeg deps
|
|
autoconf
|
|
yasm
|
|
libva # for accelerated video decode on non-nvidia
|
|
nv-codec-headers-12 # for accelerated video decode on nvidia
|
|
# end vendored ffmpeg deps
|
|
|
|
fmt
|
|
# intentionally omitted: gamemode - loaded dynamically at runtime
|
|
# intentionally omitted: httplib - upstream requires an older version than what we have
|
|
libopus
|
|
libusb1
|
|
# intentionally omitted: LLVM - heavy, only used for stack traces in the debugger
|
|
lz4
|
|
nlohmann_json
|
|
qtbase
|
|
qtmultimedia
|
|
qtwayland
|
|
qtwebengine
|
|
# intentionally omitted: renderdoc - heavy, developer only
|
|
SDL2
|
|
# not packaged in nixpkgs: simpleini
|
|
# intentionally omitted: stb - header only libraries, vendor uses git snapshot
|
|
# not packaged in nixpkgs: vulkan-memory-allocator
|
|
# intentionally omitted: xbyak - prefer vendored version for compatibility
|
|
zlib
|
|
zstd
|
|
];
|
|
|
|
# This changes `ir/opt` to `ir/var/empty` in `externals/dynarmic/src/dynarmic/CMakeLists.txt`
|
|
# making the build fail, as that path does not exist
|
|
dontFixCmake = true;
|
|
|
|
cmakeFlags = [
|
|
# actually has a noticeable performance impact
|
|
"-DYUZU_ENABLE_LTO=ON"
|
|
|
|
# build with qt6
|
|
"-DENABLE_QT6=ON"
|
|
"-DENABLE_QT_TRANSLATION=ON"
|
|
|
|
# use system libraries
|
|
# NB: "external" here means "from the externals/ directory in the source",
|
|
# so "off" means "use system"
|
|
"-DYUZU_USE_EXTERNAL_SDL2=OFF"
|
|
"-DYUZU_USE_EXTERNAL_VULKAN_HEADERS=OFF"
|
|
|
|
# don't use system ffmpeg, yuzu uses internal APIs
|
|
"-DYUZU_USE_BUNDLED_FFMPEG=ON"
|
|
|
|
# don't check for missing submodules
|
|
"-DYUZU_CHECK_SUBMODULES=OFF"
|
|
|
|
# enable some optional features
|
|
"-DYUZU_USE_QT_WEB_ENGINE=ON"
|
|
"-DYUZU_USE_QT_MULTIMEDIA=ON"
|
|
"-DUSE_DISCORD_PRESENCE=ON"
|
|
|
|
# We dont want to bother upstream with potentially outdated compat reports
|
|
"-DYUZU_ENABLE_COMPATIBILITY_REPORTING=OFF"
|
|
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
|
|
];
|
|
|
|
# Does some handrolled SIMD
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isx86_64 "-msse4.1";
|
|
|
|
# Fixes vulkan detection.
|
|
qtWrapperArgs = [
|
|
"--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib"
|
|
];
|
|
|
|
preConfigure = ''
|
|
# see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
|
|
cmakeFlagsArray+=(
|
|
"-DTITLE_BAR_FORMAT_IDLE=${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}"
|
|
"-DTITLE_BAR_FORMAT_RUNNING=${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) | {}"
|
|
)
|
|
|
|
# provide pre-downloaded tz data
|
|
mkdir -p build/externals/nx_tzdb
|
|
ln -s ${nx_tzdb} build/externals/nx_tzdb/nx_tzdb
|
|
'';
|
|
|
|
# This must be done after cmake finishes as it overwrites the file
|
|
postConfigure = ''
|
|
ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json
|
|
'';
|
|
|
|
postInstall = ''
|
|
install -Dm444 $src/dist/72-yuzu-input.rules $out/lib/udev/rules.d/72-yuzu-input.rules
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = ["--version-regex" "mainline-0-(.*)"];
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://yuzu-emu.org";
|
|
changelog = "https://yuzu-emu.org/entry";
|
|
description = "An experimental Nintendo Switch emulator written in C++";
|
|
mainProgram = "yuzu";
|
|
platforms = ["aarch64-linux" "x86_64-linux"];
|
|
license = with licenses; [
|
|
gpl3Plus
|
|
# Icons
|
|
asl20
|
|
mit
|
|
cc0
|
|
];
|
|
};
|
|
})
|