about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/parse-type/default.nix
blob: 5cfb4b610ce7a1d39695f4fc1828ec1d9059b89a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchFromGitHub
, parse
, pytestCheckHook
, six
}:

buildPythonPackage rec {
  pname = "parse-type";
  version = "0.5.6";

  src = fetchFromGitHub {
    owner = "jenisys";
    repo = "parse_type";
    rev = "v${version}";
    sha256 = "sha256-CJroqJIi5DpmR8i1lr8OJ+234615PhpVUsqK91XOT3E=";
  };

  propagatedBuildInputs = [
    parse
    six
  ];

  checkInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace "--metadata PACKAGE_UNDER_TEST parse_type" "" \
      --replace "--metadata PACKAGE_VERSION 0.5.6" "" \
      --replace "--html=build/testing/report.html --self-contained-html" "" \
      --replace "--junit-xml=build/testing/report.xml" ""
  '';

  pythonImportsCheck = [ "parse_type" ];

  meta = with lib; {
    description = "Simplifies to build parse types based on the parse module";
    homepage = "https://github.com/jenisys/parse_type";
    license = licenses.bsd3;
    maintainers = with maintainers; [ alunduil ];
  };
}