about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/anime-downloader/default.nix
blob: 235c5c58f381a76b4bed6ab288bc621a3f2c8a7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib, python3, aria2, mpv, nodejs, qt5, fetchFromGitHub }:

python3.pkgs.buildPythonApplication rec {
  pname = "anime-downloader";
  version = "5.0.14";

  src = fetchFromGitHub {
    owner = "anime-dl";
    repo = "anime-downloader";
    rev = version;
    sha256 = "sha256-Uk2mtsSrb8fCD9JCFzvLBzMEB7ViVDrKPSOKy9ALJ6o=";
  };

  nativeBuildInputs = [ qt5.wrapQtAppsHook ];

  propagatedBuildInputs = [
    aria2
    mpv
    nodejs
  ] ++ (with python3.pkgs; [
    beautifulsoup4
    cfscrape
    click
    coloredlogs
    fuzzywuzzy
    jsbeautifier
    pycryptodome
    pysmartdl
    pyqt5
    requests
    requests-cache
    selenium
    tabulate
  ]);

  preFixup = ''
    wrapQtApp "$out/bin/anime" --prefix PATH : ${lib.makeBinPath propagatedBuildInputs}
  '';

  doCheck = false;
  # FIXME: checks must be disabled because they are lacking the qt env.
  #        They fail like this, even if built and wrapped with all Qt and runtime dependencies.
  #        Ref.: https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/applications/misc/openlp/lib.nix#L20-L23

  passthru.updateScript = ./update.sh;

  meta = with lib; {
    homepage = "https://github.com/anime-dl/anime-downloader";
    description = "A simple but powerful anime downloader and streamer";
    license = licenses.unlicense;
    platforms = platforms.linux;
    maintainers = with maintainers; [ ];
  };
}