summary refs log tree commit diff
path: root/pkgs/development/python-modules/stringparser/default.nix
blob: 44e6d6baa52f40c298b034715b4b5c3e72e6067a (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
46
47
48
49
50
51
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools
, setuptools-scm
, typing-extensions
}:

buildPythonPackage rec {
  pname = "stringparser";
  version = "0.7";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "hgrecco";
    repo = "stringparser";
    rev = "refs/tags/${version}";
    hash = "sha256-gj0ooeb869JhlB9Mf5nBydiV2thTes8ys+BLJ516iSA=";
  };

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
    typing-extensions
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "stringparser"
  ];

  meta = with lib; {
    description = "Easy to use pattern matching and information extraction";
    homepage = "https://github.com/hgrecco/stringparser";
    changelog = "https://github.com/hgrecco/stringparser/blob/${version}/CHANGES";
    license = licenses.bsd3;
    maintainers = with maintainers; [ evilmav ];
  };
}