1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchPypi,
6 jinja2,
7 mock,
8 pynose,
9 poetry-core,
10 pythonOlder,
11 terminaltables,
12}:
13
14buildPythonPackage rec {
15 pname = "envs";
16 version = "1.4";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-nYQ1xphdHN1oKZ4ExY4r24rmz2ayWWqAeeb5qT8qA5g=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 click
30 jinja2
31 terminaltables
32 ];
33
34 nativeCheckInputs = [
35 mock
36 pynose
37 ];
38
39 checkPhase = ''
40 runHook preCheck
41
42 nosetests --with-isolation
43
44 runHook postCheck
45 '';
46
47 pythonImportsCheck = [ "envs" ];
48
49 meta = with lib; {
50 description = "Easy access to environment variables from Python";
51 mainProgram = "envs";
52 homepage = "https://github.com/capless/envs";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ peterhoeg ];
55 };
56}