depot/third_party/nixpkgs/pkgs/development/python-modules/pylacrosse/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

48 lines
970 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
mock,
pynose,
pyserial,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pylacrosse";
version = "0.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "hthiery";
repo = "python-lacrosse";
rev = "refs/tags/${version}";
hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "version = version," "version = '${version}',"
'';
propagatedBuildInputs = [ pyserial ];
nativeCheckInputs = [
mock
pynose
pytestCheckHook
];
pythonImportsCheck = [ "pylacrosse" ];
meta = with lib; {
description = "Python library for Jeelink LaCrosse";
mainProgram = "pylacrosse";
homepage = "https://github.com/hthiery/python-lacrosse";
license = with licenses; [ lgpl2Plus ];
maintainers = with maintainers; [ fab ];
};
}