nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 unittestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "timecop";
11 version = "0.5.0dev";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0=";
17 };
18
19 build-system = [ setuptools ];
20
21 nativeCheckInputs = [ unittestCheckHook ];
22
23 # test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4
24 preCheck = ''
25 sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py
26 '';
27
28 pythonImportsCheck = [ "timecop" ];
29
30 meta = {
31 description = "Port of the most excellent TimeCop Ruby Gem for Python";
32 homepage = "https://github.com/bluekelp/pytimecop";
33 license = lib.licenses.gpl3Plus;
34 };
35}