Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch,
6 pytestCheckHook,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "pynmea2";
12 version = "1.19.0";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-Hap5uTJ5+IfRwjXlzFx54yZEVkE4zkaYmrD0ovyXDXw=";
18 };
19
20 patches = [
21 # Removed depreciated imp and replaced with importlib, https://github.com/Knio/pynmea2/pull/164
22 (fetchpatch {
23 name = "remove-imp.patch";
24 url = "https://github.com/Knio/pynmea2/commit/c56717b5e859e978ad3b52b8f826faa5d50489f8.patch";
25 hash = "sha256-jeFyfukT+0NLNxvNCxL7TzL/8oKmKOam5ZUIvjdvN/Q=";
26 })
27 ];
28
29 build-system = [ setuptools ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "pynmea2" ];
34
35 meta = {
36 description = "Python library for the NMEA 0183 protcol";
37 homepage = "https://github.com/Knio/pynmea2";
38 changelog = "https://github.com/Knio/pynmea2/releases/tag/${version}";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ oxzi ];
41 };
42}