summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pydateinfer/default.nix
blob: 0f4693829a7a71d0e79bacc04c8a90930ff85a9f (plain)
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
{
  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 = {
    description = "Infers date format from examples";
    homepage = "https://pypi.org/project/pydateinfer/";
    license = lib.licenses.asl20;
    maintainers = [ ];
  };
}