Update default.nix

This commit is contained in:
2026-05-24 02:37:17 -03:00
parent 4279b1bc0d
commit 3debef473d
+22 -28
View File
@@ -1,40 +1,34 @@
{ { pkgs, ... }:
lib,
pkgs,
...
}:
pkgs.appimageTools.wrapType2 rec { pkgs.appimageTools.wrapType2 rec {
pname = "shiru"; pname = "helium";
version = "v6.6.0"; version = "0.12.4.1";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = "https://github.com/RockinChaos/Shiru/releases/download/${version}/linux-Shiru-${version}.AppImage"; url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage";
hash = "sha256-Y7R8gKsPm7NmzKXC0C24KqY1s7boWal3w5Lin35eswk="; sha256 = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0=";
}; };
nativeBuildInputs = with pkgs; [
makeWrapper
];
extraInstallCommands = extraInstallCommands =
let let
contents = pkgs.appimageTools.extractType2 { inherit pname version src; }; contents = pkgs.appimageTools.extract { inherit pname version src; };
in in
'' ''
mkdir -p "$out/share/applications" mkdir -p $out/share/applications
mkdir -p "$out/share/lib/shiru" cp ${contents}/${pname}.desktop $out/share/applications/${pname}.desktop
cp -r ${contents}/{locales,resources} "$out/share/lib/shiru" substituteInPlace $out/share/applications/${pname}.desktop \
cp -r ${contents}/usr/share/* "$out/share" --replace 'Exec=helium %U' 'Exec=helium' \
cp "${contents}/${pname}.desktop" "$out/share/applications/" --replace 'Exec=helium --incognito' 'Exec=helium --incognito' \
wrapProgram $out/bin/shiru --add-flags "--ozone-platform=wayland" --replace 'Exec=AppRun %U' 'Exec=helium' \
substituteInPlace $out/share/applications/${pname}.desktop --replace-fail 'Exec=AppRun' 'Exec=${meta.mainProgram}' --replace 'Exec=AppRun' 'Exec=helium'
if [ -d "${contents}/usr/share/icons" ]; then
mkdir -p $out/share/icons
cp -r ${contents}/usr/share/icons/* $out/share/icons/
fi
''; '';
meta = { # garante integração correta com desktop
description = "Shiru - Torrent streaming made simple"; extraWrapProgramArgs = ''
homepage = "https://github.com/RockinChaos/Shiru"; --set DESKTOP_FILE_NAME helium.desktop
changelog = "https://github.com/RockinChaos/Shiru/releases"; '';
license = lib.licenses.bsl11;
mainProgram = "shiru";
};
} }