···12121313## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
14141515-- Create the first release note entry in this section!
1515+- The latest version of `clonehero` now stores custom content in `~/.clonehero`. See the [migration instructions](https://clonehero.net/2022/11/29/v23-to-v1-migration-instructions.html). Typically, these content files would exist along side the binary, but the previous build used a wrapper script that would store them in `~/.config/unity3d/srylain Inc_/Clone Hero`.
16161717## Other Notable Changes {#sec-release-23.11-notable-changes}
1818
···11-{ clonehero-unwrapped
22-, makeDesktopItem
33-, buildFHSEnv
44-, liberation_ttf
55-, callPackage
66-}:
77-88-let
99- name = "clonehero";
1010- desktopName = "Clone Hero";
1111- desktopItem = makeDesktopItem {
1212- inherit name desktopName;
1313- comment = clonehero-unwrapped.meta.description;
1414- exec = name;
1515- icon = name;
1616- categories = [ "Game" ];
1717- };
1818-in
1919-buildFHSEnv {
2020- inherit name;
2121- inherit (clonehero-unwrapped) meta;
2222-2323- # Clone Hero has /usr/share/fonts hard-coded in its binary for looking up fonts.
2424- # This workaround is necessary for rendering text on the keybinding screen (and possibly elsewhere)
2525- # If a better solution is found, the FHS environment can be removed.
2626- extraBuildCommands = ''
2727- chmod +w usr/share
2828- mkdir -p usr/share/fonts/truetype
2929- ln -s ${liberation_ttf}/share/fonts/truetype/* usr/share/fonts/truetype
3030- '';
3131-3232- extraInstallCommands = ''
3333- mkdir -p "$out/share/applications" "$out/share/pixmaps"
3434- cp ${desktopItem}/share/applications/* "$out/share/applications"
3535- ln -s ${clonehero-unwrapped}/share/clonehero_Data/Resources/UnityPlayer.png "$out/share/pixmaps/${name}.png"
3636- '';
3737-3838- runScript = callPackage ./xdg-wrapper.nix { };
3939-}
-21
pkgs/games/clonehero/xdg-wrapper.nix
···11-{ stdenv, clonehero-unwrapped, writeScript }:
22-33-# Clone Hero doesn't have an installer, so it just stores configuration & data relative to the binary.
44-# This wrapper works around that limitation, storing game configuration & data in XDG_CONFIG_HOME.
55-let
66- name = "clonehero";
77- desktopName = "Clone Hero";
88-in
99-writeScript "${name}-xdg-wrapper-${clonehero-unwrapped.version}" ''
1010- #!${stdenv.shell} -e
1111- configDir="''${XDG_CONFIG_HOME:-$HOME/.config}/unity3d/srylain Inc_/${desktopName}"
1212- mkdir -p "$configDir"
1313-1414- # Force link shipped clonehero_Data, unless directory already exists (to allow modding)
1515- if [ ! -d "$configDir/clonehero_Data" ] || [ -L "$configDir/clonehero_Data" ]; then
1616- ln -snf ${clonehero-unwrapped}/share/clonehero_Data "$configDir"
1717- fi
1818-1919- # Fake argv[0] to emulate running in the config directory
2020- exec -a "$configDir/${name}" ${clonehero-unwrapped}/bin/${name} "$@"
2121-''