1{ lib
2, buildPythonPackage
3, click
4, fetchPypi
5, jinja2
6, mock
7, nose
8, poetry-core
9, pythonOlder
10, terminaltables
11}:
12
13buildPythonPackage rec {
14 pname = "envs";
15 version = "1.4";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-nYQ1xphdHN1oKZ4ExY4r24rmz2ayWWqAeeb5qT8qA5g=";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
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 pythonImportsCheck = [
49 "envs"
50 ];
51
52 meta = with lib; {
53 description = "Easy access to environment variables from Python";
54 homepage = "https://github.com/capless/envs";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ peterhoeg ];
57 };
58}