at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 docopt, 5 fetchFromGitHub, 6 poetry-core, 7 pytest-vcr, 8 pytestCheckHook, 9 requests, 10 setuptools, 11 vcrpy, 12}: 13 14buildPythonPackage rec { 15 pname = "thingspeak"; 16 version = "1.0.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "mchwalisz"; 21 repo = "thingspeak"; 22 tag = "v${version}"; 23 hash = "sha256-9YvudzksWp130hkG8WxiX9WHegAVH2TT1vwMbLJ13qE="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail "poetry.masonry.api" "poetry.core.masonry.api" \ 29 --replace-fail 'requires = ["poetry>=0.12"]' 'requires = ["poetry-core"]' 30 ''; 31 32 build-system = [ 33 poetry-core 34 ]; 35 36 dependencies = [ 37 docopt 38 requests 39 setuptools 40 ]; 41 42 nativeCheckInputs = [ 43 pytest-vcr 44 pytestCheckHook 45 vcrpy 46 ]; 47 48 disabledTests = [ 49 # VCR cassette conflicts with different API keys 50 "test_get_with_key" 51 ]; 52 53 pythonImportsCheck = [ 54 "thingspeak" 55 ]; 56 57 meta = { 58 description = "Client library for the thingspeak.com API"; 59 homepage = "https://github.com/mchwalisz/thingspeak"; 60 changelog = "https://github.com/mchwalisz/thingspeak/releases/tag/v${version}"; 61 license = lib.licenses.lgpl3Only; 62 maintainers = [ lib.maintainers.jamiemagee ]; 63 }; 64}