nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 62 lines 1.4 kB view raw
1{ lib 2, ascii-magic 3, buildPythonPackage 4, fetchFromGitHub 5, pillow 6, pytest-httpserver 7, pytestCheckHook 8, pythonOlder 9, requests 10, oauthlib 11}: 12 13buildPythonPackage rec { 14 pname = "weconnect"; 15 version = "0.40.0"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "tillsteinbach"; 22 repo = "WeConnect-python"; 23 rev = "v${version}"; 24 sha256 = "sha256-NXINATb8/yDPnpwQEbPhuazdTlsZqv7BUPzedIg0IV4="; 25 }; 26 27 propagatedBuildInputs = [ 28 ascii-magic 29 oauthlib 30 pillow 31 requests 32 ]; 33 34 checkInputs = [ 35 pytest-httpserver 36 pytestCheckHook 37 ]; 38 39 postPatch = '' 40 substituteInPlace weconnect/__version.py \ 41 --replace "develop" "${version}" 42 substituteInPlace setup.py \ 43 --replace "setup_requires=SETUP_REQUIRED," "setup_requires=[]," \ 44 --replace "tests_require=TEST_REQUIRED," "tests_require=[]," 45 substituteInPlace image_extra_requirements.txt \ 46 --replace "pillow~=9.0.1" "pillow" 47 substituteInPlace pytest.ini \ 48 --replace "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \ 49 --replace "pytest-cov" "" 50 ''; 51 52 pythonImportsCheck = [ 53 "weconnect" 54 ]; 55 56 meta = with lib; { 57 description = "Python client for the Volkswagen WeConnect Services"; 58 homepage = "https://github.com/tillsteinbach/WeConnect-python"; 59 license = with licenses; [ mit ]; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}