Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, mock 5, nose 6, pyserial 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "pylacrosse"; 13 version = "0.4"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "hthiery"; 20 repo = "python-lacrosse"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw="; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "version = version," "version = '${version}'," 28 ''; 29 30 propagatedBuildInputs = [ 31 pyserial 32 ]; 33 34 nativeCheckInputs = [ 35 mock 36 nose 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ 41 "pylacrosse" 42 ]; 43 44 meta = with lib; { 45 description = "Python library for Jeelink LaCrosse"; 46 homepage = "https://github.com/hthiery/python-lacrosse"; 47 license = with licenses; [ lgpl2Plus ]; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}