1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 unittestCheckHook,
6 pytz,
7 pyyaml,
8 argparse,
9}:
10
11buildPythonPackage rec {
12 pname = "pydateinfer";
13 version = "0.3.0";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "wdm0006";
18 repo = "dateinfer";
19 rev = "${version},"; # yes the comma is required, this is correct name of git tag
20 hash = "sha256-0gy7wfT/uMTmpdIF2OPGVeUh+4yqJSI2Ebif0Lf/DLM=";
21 };
22
23 propagatedBuildInputs = [ pytz ];
24
25 preCheck = "cd dateinfer";
26 nativeCheckInputs = [
27 unittestCheckHook
28 pyyaml
29 argparse
30 ];
31 pythonImportsCheck = [ "dateinfer" ];
32
33 meta = with lib; {
34 description = "Infers date format from examples";
35 homepage = "https://pypi.org/project/pydateinfer/";
36 license = licenses.asl20;
37 maintainers = with maintainers; [ mbalatsko ];
38 };
39}