1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, click
6, jinja2
7, terminaltables
8, mock
9, nose
10}:
11
12buildPythonPackage rec {
13 pname = "envs";
14 version = "1.3";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "ccf5cd85ddb8ed335e39ed8a22e0d23658f5a6d7da430f225e6f750c6f50ae42";
19 };
20
21 patches = [
22 # https://github.com/capless/envs/pull/19
23 (fetchpatch {
24 url = "https://github.com/capless/envs/commit/6947043fa9120a7b17094fd43ee0e1edf808f42b.patch";
25 sha256 = "0zswg8kp2g922mkc7x34ps37qli1d1mjwna2jfrbnsq2fg4mk818";
26 })
27 ];
28
29 propagatedBuildInputs = [
30 click
31 jinja2
32 terminaltables
33 ];
34
35 checkInputs = [
36 mock
37 nose
38 ];
39
40 checkPhase = ''
41 runHook preCheck
42
43 nosetests --with-isolation
44
45 runHook postCheck
46 '';
47
48 meta = with lib; {
49 description = "Easy access to environment variables from Python";
50 homepage = "https://github.com/capless/envs";
51 license = licenses.asl20;
52 maintainers = with maintainers; [ peterhoeg ];
53 };
54}