Change:
The package includes the version in the name. This means users must change name predicates (i.e. allowUnfreePredicate) for each version change. This was confirmed to be undesirable here: I guess we just forgot to remove it. CC

Discussion:
let pname = "osu-lazer-bin"; version = "2023.1114.1"; <del> name = "${pname}-${version}"; osu-lazer-bin-src = { aarch64-darwin = { </del> <ins> src = { aarch64-darwin = fetchzip { </ins> url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Apple.Silicon.zip"; <del> sha256 = "sha256-MQkHbodSkAQQpjaBP+Q35afcCrgcie6UoUldc+vjRA0="; </del> <ins> hash = "sha256-MQkHbodSkAQQpjaBP+Q35afcCrgcie6UoUldc+vjRA0="; stripRoot = false; </ins> }; <del> x86_64-darwin = { </del> <ins> x86_64-darwin = fetchzip { </ins> url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Intel.zip"; <del> sha256 = "sha256-40ylXbn9jV9v+ve1hFwhT5/jhzNfWHjL2WIplVUD2qk="; </del> <ins> hash = "sha256-40ylXbn9jV9v+ve1hFwhT5/jhzNfWHjL2WIplVUD2qk="; stripRoot = false; </ins> }; <del> x86_64-linux = { </del> <ins> x86_64-linux = fetchurl { </ins> url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage"; <del> sha256 = "sha256-Q2z2Js0Zc9nvyQNxzLuuV7TcwiNIRo+RMRER6ZYgh74="; </del> <ins> hash = "sha256-Q2z2Js0Zc9nvyQNxzLuuV7TcwiNIRo+RMRER6ZYgh74="; </ins> }; }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported."); <del> linux = appimageTools.wrapType2 rec { inherit name pname version meta; src = fetchurl (osu-lazer-bin-src); extraPkgs = pkgs: with pkgs; [ icu ]; extraInstallCommands = let contents = appimageTools.extract { inherit pname version src; }; in '' mv -v $out/bin/${pname}-${version} $out/bin/osu! install -m 444 -D ${contents}/osu!.desktop -t $out/share/applications for i in 16 32 48 64 96 128 256 512 1024; do install -D ${contents}/osu!.png $out/share/icons/hicolor/''${i}x$i/apps/osu!.png done ''; }; darwin = stdenv.mkDerivation rec { inherit name pname version meta; src = fetchzip (osu-lazer-bin-src // { stripRoot = false; }); dontBuild = true; dontFixup = true; installPhase = '' runHook preInstall APP_DIR="$out/Applications" mkdir -p "$APP_DIR" cp -r . "$APP_DIR" runHook postInstall ''; }; meta = with lib; { </del> <ins> meta = { </ins> description = "Rhythm is just a *click* away (AppImage version for score submission and multiplayer, and binary distribution for Darwin systems)"; homepage = "https://osu.ppy.sh"; <del> license = with licenses; [ </del> <ins> license = with lib.licenses; [ </ins> mit cc-by-nc-40 unfreeRedistributable # osu-framework contains libbass.so in repository ]; <del> sourceProvenance = with sourceTypes; [ binaryNativeCode ]; maintainers = with maintainers; [ delan stepbrobd spacefault ]; </del> <ins> sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; maintainers = with lib.maintainers; [ delan spacefault stepbrobd ]; </ins> mainProgram = "osu!"; platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; };

passthru.updateScript = ./update-bin.sh; in if stdenv.isDarwin <del> then darwin else linux </del> <ins> then stdenv.mkDerivation { inherit pname version src meta passthru; installPhase = '' runHook preInstall APP_DIR="$out/Applications" mkdir -p "$APP_DIR" cp -r . "$APP_DIR" runHook postInstall ''; } else appimageTools.wrapType2 { inherit pname version src meta passthru; extraPkgs = pkgs: with pkgs; [ icu ]; extraInstallCommands = let contents = appimageTools.extract { inherit pname version src; }; in '' mv -v $out/bin/${pname}-${version} $out/bin/osu! install -m 444 -D ${contents}/osu!.desktop -t $out/share/applications for i in 16 32 48 64 96 128 256 512 1024; do install -D ${contents}/osu!.png $out/share/icons/hicolor/''${i}x$i/apps/osu!.png done ''; } </ins>

else hash=$(jq -r '.hash' <<<"$prefetch_output") fi <del> echo "$1 ($2): sha256 = $hash" </del> <ins> echo "$1 ($2): hash = $hash" </ins> sed -Ei.bak '/ *'"$1"' = /{N;N; s@("sha256-)[^;"]+@"'"$hash"'@}' "$bin_file" rm "$bin_file.bak" done