lol

python311Packages.pysmartdl: refactor

+34 -6
+34 -6
pkgs/development/python-modules/pysmartdl/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , fetchFromGitHub 4 + , setuptools 5 + , pytestCheckHook 4 6 }: 5 7 6 8 buildPythonPackage rec { 7 9 pname = "pysmartdl"; 8 10 version = "1.3.4"; 9 - src = fetchFromGitHub ({ 11 + pyproject = true; 12 + 13 + src = fetchFromGitHub { 10 14 owner = "iTaybb"; 11 - repo = pname; 12 - rev = "b93df794e1e60017c42d9520ac097b6fd38c2e8b"; 15 + repo = "pySmartDL"; 16 + rev = "refs/tags/v${version}"; 13 17 hash = "sha256-Etyv3xCB1cGozWDsskygwcTHJfC+V5hvqBNQAF8SIMM="; 14 - }); 18 + }; 15 19 16 - doCheck = false; 20 + nativeBuildInputs = [ 21 + setuptools 22 + ]; 23 + 24 + nativeCheckInputs = [ 25 + pytestCheckHook 26 + ]; 27 + 28 + disabledTests = [ 29 + # touch the network 30 + "test_basic_auth" 31 + "test_custom_headers" 32 + "test_download" 33 + "test_hash" 34 + "test_mirrors" 35 + "test_pause_unpause" 36 + "test_speed_limiting" 37 + "test_stop" 38 + "test_timeout" 39 + "test_unicode" 40 + ]; 41 + 42 + pythonImportsCheck = [ 43 + "pySmartDL" 44 + ]; 17 45 18 46 meta = with lib; { 19 47 homepage = "https://github.com/iTaybb/pySmartDL"; 20 48 description = "A Smart Download Manager for Python"; 49 + changelog = "https://github.com/iTaybb/pySmartDL/blob/${src.rev}/ChangeLog.txt"; 21 50 license = licenses.unlicense; 22 - platforms = platforms.linux; 23 51 maintainers = with maintainers; [ ]; 24 52 }; 25 53 }