Files
nix-pkgs/pkgs/shiru/default.nix
T
2026-05-24 01:49:49 -03:00

41 lines
1.2 KiB
Nix

{
lib,
pkgs,
...
}:
pkgs.appimageTools.wrapType2 rec {
pname = "shiru";
version = "v6.6.0";
src = pkgs.fetchurl {
url = "https://github.com/RockinChaos/Shiru/releases/download/${version}/linux-Shiru-${version}.AppImage";
hash = "sha256-Y7R8gKsPm7NmzKXC0C24KqY1s7boWal3w5Lin35eswk=";
};
nativeBuildInputs = with pkgs; [
makeWrapper
];
extraInstallCommands =
let
contents = pkgs.appimageTools.extractType2 { inherit pname version src; };
in
''
mkdir -p "$out/share/applications"
mkdir -p "$out/share/lib/shiru"
cp -r ${contents}/{locales,resources} "$out/share/lib/shiru"
cp -r ${contents}/usr/share/* "$out/share"
cp "${contents}/${pname}.desktop" "$out/share/applications/"
wrapProgram $out/bin/shiru --add-flags "--ozone-platform=wayland"
substituteInPlace $out/share/applications/${pname}.desktop --replace-fail 'Exec=AppRun' 'Exec=${meta.mainProgram}'
'';
meta = {
description = "Shiru - Torrent streaming made simple";
homepage = "https://github.com/RockinChaos/Shiru";
changelog = "https://github.com/RockinChaos/Shiru/releases";
license = lib.licenses.bsl11;
mainProgram = "shiru";
};
}