nixpkgs/pkgs/by-name/mi/miru/package.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

57 lines
1.4 KiB
Nix

{
stdenv,
lib,
callPackage,
}:
let
pname = "miru";
version = "5.5.0";
meta = with lib; {
description = "Stream anime torrents, real-time with no waiting for downloads";
homepage = "https://miru.watch";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
d4ilyrun
matteopacini
];
mainProgram = "miru";
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
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.
'';
};
passthru = {
updateScript = ./update.sh;
};
in
if stdenv.hostPlatform.isDarwin then
callPackage ./darwin.nix {
inherit
pname
version
meta
passthru
;
}
else
callPackage ./linux.nix {
inherit
pname
version
meta
passthru
;
}