22 wayland, # (not used by default, enable with SDL_VIDEODRIVER=wayland - doesn't support HiDPI)
27 stdenv.mkDerivation (finalAttrs: {
32 url = "https://github.com/YARC-Official/YARG/releases/download/v${finalAttrs.version}/YARG_v${finalAttrs.version}-Linux-x86_64.zip";
34 hash = "sha256-Za+CnuSTfJZVdW0pWvGDnKcbhZsgtNPRWYj1qOA8+Zs=";
37 nativeBuildInputs = [ autoPatchelfHook ];
40 # Load-time libraries (loaded from DT_NEEDED section in ELF binary)
46 # Run-time libraries (loaded with dlopen)
63 desktopItem = makeDesktopItem {
66 comment = finalAttrs.meta.description;
69 categories = [ "Game" ];
75 install -Dm755 YARG "$out/bin/yarg"
76 install -Dm644 UnityPlayer.so "$out/libexec/yarg/UnityPlayer.so"
78 mkdir -p "$out/share/pixmaps"
79 cp -r YARG_Data "$out/share/yarg"
80 ln -s "$out/share/yarg" "$out/bin/yarg_Data"
81 ln -s "$out/share/yarg/Resources/UnityPlayer.png" "$out/share/pixmaps/yarg.png"
82 install -Dm644 "$desktopItem/share/applications/yarg.desktop" "$out/share/applications/yarg.desktop"
87 # Patch required run-time libraries as load-time libraries
89 # Libraries found with:
90 # > strings UnityPlayer.so | grep '\.so'
92 # > LD_DEBUG=libs yarg
95 --add-needed libasound.so.2 \
96 --add-needed libdbus-1.so.3 \
97 --add-needed libGL.so.1 \
98 --add-needed libhidapi-hidraw.so.0 \
99 --add-needed libpthread.so.0 \
100 --add-needed libudev.so.1 \
101 --add-needed libvulkan.so.1 \
102 --add-needed libwayland-client.so.0 \
103 --add-needed libwayland-cursor.so.0 \
104 --add-needed libwayland-egl.so.1 \
105 --add-needed libX11.so.6 \
106 --add-needed libXcursor.so.1 \
107 --add-needed libXext.so.6 \
108 --add-needed libXi.so.6 \
109 --add-needed libXinerama.so.1 \
110 --add-needed libxkbcommon.so.0 \
111 --add-needed libXrandr.so.2 \
112 --add-needed libXss.so.1 \
113 --add-needed libXxf86vm.so.1 \
114 "$out/libexec/yarg/UnityPlayer.so"
117 passthru.updateScript = nix-update-script { };
120 description = "Free, open-source, plastic guitar game";
121 homepage = "https://yarg.in";
122 license = licenses.lgpl3Plus;
123 maintainers = with maintainers; [ kira-bruneau ];
124 platforms = [ "x86_64-linux" ];