nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "metar";
10 version = "1.9.0";
11
12 src = fetchFromGitHub {
13 owner = "python-metar";
14 repo = "python-metar";
15 rev = "v${version}";
16 sha256 = "sha256-pl2NWRfFCYyM2qvBt4Ic3wgbGkYZvAO6pX2Set8zYW8=";
17 };
18
19 patches = [
20 (fetchpatch {
21 # Fix flapping test; https://github.com/python-metar/python-metar/issues/161
22 url = "https://github.com/python-metar/python-metar/commit/716fa76682e6c2936643d1cf62e3d302ef29aedd.patch";
23 hash = "sha256-y82NN+KDryOiH+eG+2ycXCO9lqQLsah4+YpGn6lM2As=";
24 })
25 ];
26
27 checkInputs = [ pytestCheckHook ];
28
29 disabledTests = [
30 # https://github.com/python-metar/python-metar/issues/165
31 "test_033_parseTime_auto_month"
32 ];
33
34 pythonImportsCheck = [ "metar" ];
35
36 meta = with lib; {
37 description = "Python parser for coded METAR weather reports";
38 homepage = "https://github.com/python-metar/python-metar";
39 license = with licenses; [ bsd1 ];
40 maintainers = with maintainers; [ fab ];
41 };
42}