ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / pkgs / development / python-modules / pylacrosse / default.nix
blob0bd6c7f0b977f3ca7dd31d063b4ea02226d6c911
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch2,
6   mock,
7   pyserial,
8   pytestCheckHook,
9   pythonOlder,
12 buildPythonPackage rec {
13   pname = "pylacrosse";
14   version = "0.4";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "hthiery";
21     repo = "python-lacrosse";
22     rev = "refs/tags/${version}";
23     hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw=";
24   };
26   patches = [
27     # Migrate to pytest, https://github.com/hthiery/python-lacrosse/pull/17
28     (fetchpatch2 {
29       url = "https://github.com/hthiery/python-lacrosse/commit/cc2623c667bc252360a9b5ccb4fc05296cf23d9c.patch?full_index=1";
30       hash = "sha256-LKryLnXMKj1lVClneyHNVOWM5KPPhOGy0/FX/7Qy/jU=";
31     })
32   ];
34   postPatch = ''
35     substituteInPlace setup.py \
36       --replace "version = version," "version = '${version}',"
37   '';
39   propagatedBuildInputs = [ pyserial ];
41   nativeCheckInputs = [
42     mock
43     pytestCheckHook
44   ];
46   pythonImportsCheck = [ "pylacrosse" ];
48   meta = with lib; {
49     description = "Python library for Jeelink LaCrosse";
50     mainProgram = "pylacrosse";
51     homepage = "https://github.com/hthiery/python-lacrosse";
52     license = with licenses; [ lgpl2Plus ];
53     maintainers = with maintainers; [ fab ];
54   };