cubelify: init at 1.25.9

This commit is contained in:
yunfachi
2026-02-07 22:33:48 +03:00
parent a1b83f926c
commit b9d7e27b7c
2 changed files with 53 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
{
appimageTools,
fetchurl,
lib,
makeWrapper,
}:
appimageTools.wrapType2 rec {
pname = "cubelify";
version = "1.25.9";
src = fetchurl {
url = "https://storage.cubelify.com/overlay/v1/Cubelify%20Overlay-${version}.AppImage";
hash = "sha512-2Kkd8nH//UBYL7K01bZWlOUBTfHpp8GjtB0LwYxp/+/yJJfGq+3eTQGJnlt0mHcnIauVy1ep4IKlPSJQqtigKA==";
};
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands =
let
contents = appimageTools.extract { inherit pname version src; };
in
''
wrapProgram $out/bin/cubelify \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
install -Dm444 ${contents}/cubelify-overlay.desktop -t $out/share/applications/
install -Dm444 ${contents}/cubelify-overlay.png -t $out/share/pixmaps/
substituteInPlace $out/share/applications/cubelify-overlay.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=cubelify' \
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Powerful and feature-rich Hypixel anti-sniping stats overlay";
homepage = "https://cubelify.com/";
license = with lib.licenses; [ unfree ];
mainProgram = "cubelify";
maintainers = with lib.maintainers; [ yunfachi ];
platforms = [ "x86_64-linux" ];
};
}
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl yq
set -eu -o pipefail
target="$(dirname "$(readlink -f "$0")")/package.nix"
host="https://storage.cubelify.com"
metadata=$(curl "$host/overlay/v1/latest-linux.yml")
version=$(echo "$metadata" | yq .version -r | cut -d- -f1)
hash=$(echo "$metadata" | yq .sha512 -r)
sed -i "s@version = .*;@version = \"$version\";@g" "$target"
sed -i "s@hash.* = .*;@hash = \"sha512-$hash\";@g" "$target"