summary refs log tree commit diff
path: root/pkgs/development/python-modules/pydateinfer/default.nix
blob: a2fb97236dfd4731d008e178dbd9db3129f21dbd (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, unittestCheckHook
, pytz
, pyyaml
, argparse
}:

buildPythonPackage rec {
  pname = "pydateinfer";
  version = "0.3.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "wdm0006";
    repo = "dateinfer";
    rev = "${version},"; # yes the comma is required, this is correct name of git tag
    hash = "sha256-0gy7wfT/uMTmpdIF2OPGVeUh+4yqJSI2Ebif0Lf/DLM=";
  };

  propagatedBuildInputs = [
    pytz
  ];

  preCheck = "cd dateinfer";
  nativeCheckInputs = [
    unittestCheckHook
    pyyaml
    argparse
  ];
  pythonImportsCheck = [ "dateinfer" ];

  meta = with lib; {
    description = "Infers date format from examples";
    homepage = "https://pypi.org/project/pydateinfer/";
    license = licenses.asl20;
    maintainers = with maintainers; [ mbalatsko ];
  };
}