Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, mock 5, pytestCheckHook 6, pythonOlder 7, requests 8, responses 9, setuptools 10, urllib3 11}: 12 13buildPythonPackage rec { 14 pname = "tank-utility"; 15 version = "1.4.1"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "krismolendyke"; 22 repo = pname; 23 rev = version; 24 hash = "sha256-2cxAaSyreIzQzCUtiolEV7JbGFKL8Mob3337J0jlMsU="; 25 }; 26 27 postPatch = '' 28 # urllib3[secure] is not picked-up 29 substituteInPlace setup.py \ 30 --replace "urllib3[secure]" "urllib3" 31 ''; 32 33 propagatedBuildInputs = [ 34 requests 35 urllib3 36 setuptools 37 ] ++ urllib3.optional-dependencies.secure; 38 39 nativeCheckInputs = [ 40 mock 41 pytestCheckHook 42 responses 43 ]; 44 45 pythonImportsCheck = [ 46 "tank_utility" 47 ]; 48 49 meta = with lib; { 50 description = "Library for the Tank Utility API"; 51 homepage = "https://github.com/krismolendyke/tank-utility"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}