Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 61 lines 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, pyjwt 7, ratelimit 8, pytz 9, requests 10, requests-mock 11}: 12 13buildPythonPackage rec { 14 pname = "pyflume"; 15 version = "0.7.0"; 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "ChrisMandich"; 20 repo = "PyFlume"; 21 rev = "v${version}"; 22 sha256 = "129sz33a270v120bzl9l98nmvdzn7ns4cf9w2v18lmzlldbyz2vn"; 23 }; 24 25 prePatch = '' 26 substituteInPlace setup.py --replace 'pyjwt==2.0.1' 'pyjwt>=2.0.1' 27 substituteInPlace setup.py --replace 'ratelimit==2.2.1' 'ratelimit>=2.2.1' 28 substituteInPlace setup.py --replace 'pytz==2019.2' 'pytz>=2019.2' 29 substituteInPlace setup.py --replace 'requests==2.24.0' 'requests>=2.24.0' 30 ''; 31 32 propagatedBuildInputs = [ 33 pyjwt 34 ratelimit 35 pytz 36 requests 37 ]; 38 39 checkInputs = [ 40 requests-mock 41 pytestCheckHook 42 ]; 43 44 postPatch = '' 45 # https://github.com/ChrisMandich/PyFlume/issues/18 46 substituteInPlace setup.py \ 47 --replace "pyjwt==2.0.1" "pyjwt>=2.0.1" \ 48 --replace "ratelimit==2.2.1" "ratelimit>=2.2.1" \ 49 --replace "pytz==2019.2" "pytz>=2019.2" \ 50 --replace "requests==2.24.0" "requests>=2.24.0" 51 ''; 52 53 pythonImportsCheck = [ "pyflume" ]; 54 55 meta = with lib; { 56 description = "Python module to work with Flume sensors"; 57 homepage = "https://github.com/ChrisMandich/PyFlume"; 58 license = with licenses; [ mit ]; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}