Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / parse-type / default.nix
blobe7ebfb5c63e40a5a6bf7602fa07e4e3cabc586f1
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , parse
5 , pytestCheckHook
6 , six
7 }:
9 buildPythonPackage rec {
10   pname = "parse-type";
11   version = "0.6.2";
13   src = fetchFromGitHub {
14     owner = "jenisys";
15     repo = "parse_type";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-dunvcSi+nN5VruvRUPIEpkyUsmeS+kIYDfS8ibDR96s=";
18   };
20   propagatedBuildInputs = [
21     parse
22     six
23   ];
25   nativeCheckInputs = [
26     pytestCheckHook
27   ];
29   postPatch = ''
30     substituteInPlace pytest.ini \
31       --replace "--metadata PACKAGE_UNDER_TEST parse_type" "" \
32       --replace "--metadata PACKAGE_VERSION ${version}" "" \
33       --replace "--html=build/testing/report.html --self-contained-html" "" \
34       --replace "--junit-xml=build/testing/report.xml" ""
35   '';
37   pythonImportsCheck = [ "parse_type" ];
39   meta = with lib; {
40     description = "Simplifies to build parse types based on the parse module";
41     homepage = "https://github.com/jenisys/parse_type";
42     license = licenses.bsd3;
43     maintainers = with maintainers; [ alunduil ];
44   };