1{ lib
2, buildPythonPackage
3, internetarchive
4, fetchPypi
5, yt-dlp
6, docopt
7, pythonOlder
8, urllib3
9}:
10
11buildPythonPackage rec {
12 pname = "tubeup";
13 version = "0.0.35";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "006aea68bb8d967a7427c58ee7862e3f2481dae667c2bbcfb1a1f2fd80e665d1";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "internetarchive==3.0.2" "internetarchive" \
26 --replace "urllib3==1.26.13" "urllib3" \
27 --replace "docopt==0.6.2" "docopt"
28 '';
29
30 propagatedBuildInputs = [
31 internetarchive
32 docopt
33 urllib3
34 yt-dlp
35 ];
36
37 pythonImportsCheck = [
38 "tubeup"
39 ];
40
41 # Tests failing upstream
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Youtube (and other video site) to Internet Archive Uploader";
46 homepage = "https://github.com/bibanon/tubeup";
47 changelog = "https://github.com/bibanon/tubeup/releases/tag/${version}";
48 license = licenses.gpl3Only;
49 maintainers = with maintainers; [ marsam ];
50 };
51}