summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/timecop/default.nix
blob: a086993bbf4d0fca62652fa33a68643ff7c538b2 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "timecop";
  version = "0.5.0dev";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ unittestCheckHook ];

  # test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4
  preCheck = ''
    sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py
  '';

  pythonImportsCheck = [ "timecop" ];

  meta = {
    description = "Port of the most excellent TimeCop Ruby Gem for Python";
    homepage = "https://github.com/bluekelp/pytimecop";
    license = lib.licenses.gpl3Plus;
  };
}