nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 42 lines 896 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "goodwe"; 10 version = "0.2.17"; 11 format = "pyproject"; 12 13 disabled = pythonOlder "3.8"; 14 15 src = fetchFromGitHub { 16 owner = "marcelblijleven"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "sha256-Lx7jvL7Fyq8fqJQq8ZgEG/V20+tHxw3yl3s7scAwwjA="; 20 }; 21 22 checkInputs = [ 23 pytestCheckHook 24 ]; 25 26 postPatch = '' 27 substituteInPlace setup.cfg \ 28 --replace "'marcelblijleven@gmail.com" "marcelblijleven@gmail.com" \ 29 --replace "version: file: VERSION" "version = ${version}" 30 ''; 31 32 pythonImportsCheck = [ 33 "goodwe" 34 ]; 35 36 meta = with lib; { 37 description = "Python library for connecting to GoodWe inverter"; 38 homepage = "https://github.com/marcelblijleven/goodwe"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ fab ]; 41 }; 42}