Unverified Commit 12c18b20 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #172872 from d4ilyrun/miru

parents 934f5c35 a5949fdd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4116,6 +4116,12 @@
    github = "D3vil0p3r";
    githubId = 83867734;
  };
  d4ilyrun = {
    name = "Léo Duboin";
    email = "leo@duboin.com";
    github = "d4ilyrun";
    githubId = 34611103;
  };
  dadada = {
    name = "dadada";
    email = "dadada@dadada.li";
+53 −0
Original line number Diff line number Diff line
{ lib
, fetchurl
, appimageTools
}:

appimageTools.wrapType2 rec {
  pname = "miru";
  version = "4.5.10";

  src = fetchurl {
    url = "https://github.com/ThaUnknown/miru/releases/download/v${version}/linux-Miru-${version}.AppImage";
    name = "${pname}-${version}.AppImage";
    sha256 = "sha256-ptaviLwr0X/MuF517YLW7i9+rtnktcpgHVqMHn+tXWg=";
  };

  extraInstallCommands =
    let
      contents = appimageTools.extractType2 { inherit pname version src; };
    in
    ''
      mkdir -p "$out/share/applications"
      mkdir -p "$out/share/lib/miru"
      cp -r ${contents}/{locales,resources} "$out/share/lib/miru"
      cp -r ${contents}/usr/* "$out"
      cp "${contents}/${pname}.desktop" "$out/share/applications/"
      mv "$out/bin/${pname}-${version}" "$out/bin/${pname}"
      substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
    '';

  meta = with lib; {
    description = "Stream anime torrents, real-time with no waiting for downloads";
    homepage = "https://github.com/ThaUnknown/miru#readme";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.d4ilyrun ];
    mainProgram = "miru";

    platforms = [ "x86_64-linux" ];
    sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];

    longDescription = ''
      A pure JS BitTorrent streaming environment, with a built-in list manager.
      Imagine qBit + Taiga + MPV, all in a single package, but streamed real-time.
      Completely ad free with no tracking/data collection.

      This app is meant to feel look, work and perform like a streaming website/app,
      while providing all the advantages of torrenting, like file downloads,
      higher download speeds, better video quality and quicker releases.

      Unlike qBit's sequential, seeking into undownloaded data will prioritise downloading that data,
      instead of flat out closing MPV.
    '';
  };
}