summary refs log tree commit diff
path: root/pkgs/tools/misc/twspace-dl/default.nix
blob: 48f760b0e0f1816325505416557f866cbd2d1004 (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
{ lib, python3Packages, fetchPypi, ffmpeg-headless }:

python3Packages.buildPythonApplication rec {
  pname = "twspace-dl";
  version = "2023.7.24.1";

  format = "pyproject";

  src = fetchPypi {
    inherit version;
    pname = "twspace_dl";
    sha256 = "sha256-Oq9k5Nfixf1vihhna7g3ZkqCwEtCdnvlbxIuOnGVoKE=";
  };

  nativeBuildInputs = with python3Packages; [ poetry-core ];

  propagatedBuildInputs = with python3Packages; [
    mutagen
    requests
  ];

  makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]}" ];

  pythonImportsCheck = [ "twspace_dl" ];

  meta = with lib; {
    description = "A python module to download twitter spaces";
    homepage = "https://github.com/HoloArchivists/twspace-dl";
    changelog = "https://github.com/HoloArchivists/twspace-dl/releases/tag/${version}";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ marsam ];
    mainProgram = "twspace_dl";
  };
}