18 , vulkan-loader # (not used by default, enable in settings menu)
19 , wayland # (not used by default, enable with SDL_VIDEODRIVER=wayland - doesn't support HiDPI)
23 stdenv.mkDerivation (finalAttrs: {
25 version = "1.0.0.4080";
28 url = "https://github.com/clonehero-game/releases/releases/download/V${finalAttrs.version}/CloneHero-linux.tar.xz";
29 hash = "sha256-YWLV+wgQ9RfKRSSWh/x0PMjB6tFA4YpHb9WtYOOgZZI=";
32 outputs = [ "out" "doc" ];
34 nativeBuildInputs = [ autoPatchelfHook ];
37 # Load-time libraries (loaded from DT_NEEDED section in ELF binary)
43 # Run-time libraries (loaded with dlopen)
58 desktopItem = makeDesktopItem {
60 desktopName = "Clone Hero";
61 comment = finalAttrs.meta.description;
64 categories = [ "Game" ];
70 install -Dm755 clonehero "$out/bin/clonehero"
71 install -Dm644 UnityPlayer.so "$out/libexec/clonehero/UnityPlayer.so"
73 mkdir -p "$out/share/pixmaps"
74 cp -r clonehero_Data "$out/share/clonehero"
75 ln -s "$out/share/clonehero" "$out/bin/clonehero_Data"
76 ln -s "$out/share/clonehero/Resources/UnityPlayer.png" "$out/share/pixmaps/clonehero.png"
77 install -Dm644 "$desktopItem/share/applications/clonehero.desktop" "$out/share/applications/clonehero.desktop"
79 mkdir -p "$doc/share/doc/clonehero"
80 cp -r CLONE_HERO_MANUAL.{pdf,txt} Custom EULA.txt THIRDPARTY.txt "$doc/share/doc/clonehero"
85 # Patch required run-time libraries as load-time libraries
87 # Libraries found with:
88 # > strings UnityPlayer.so | grep '\.so'
90 # > LD_DEBUG=libs clonehero
93 --add-needed libasound.so.2 \
94 --add-needed libdbus-1.so.3 \
95 --add-needed libpthread.so.0 \
96 --add-needed libudev.so.1 \
97 --add-needed libvulkan.so.1 \
98 --add-needed libwayland-client.so.0 \
99 --add-needed libwayland-cursor.so.0 \
100 --add-needed libwayland-egl.so.1 \
101 --add-needed libX11.so.6 \
102 --add-needed libXcursor.so.1 \
103 --add-needed libXext.so.6 \
104 --add-needed libXi.so.6 \
105 --add-needed libXinerama.so.1 \
106 --add-needed libxkbcommon.so.0 \
107 --add-needed libXrandr.so.2 \
108 --add-needed libXss.so.1 \
109 --add-needed libXxf86vm.so.1 \
110 "$out/libexec/clonehero/UnityPlayer.so"
114 description = "Clone of Guitar Hero and Rockband-style games";
115 homepage = "https://clonehero.net";
116 license = licenses.unfree;
117 maintainers = with maintainers; [ kira-bruneau syboxez ];
118 platforms = [ "x86_64-linux" ];