Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 click, 5 fetchPypi, 6 jinja2, 7 mock, 8 nose, 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 # test rely on nose 35 doCheck = pythonOlder "3.12"; 36 37 nativeCheckInputs = [ 38 mock 39 nose 40 ]; 41 42 checkPhase = '' 43 runHook preCheck 44 45 nosetests --with-isolation 46 47 runHook postCheck 48 ''; 49 50 pythonImportsCheck = [ "envs" ]; 51 52 meta = with lib; { 53 description = "Easy access to environment variables from Python"; 54 mainProgram = "envs"; 55 homepage = "https://github.com/capless/envs"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ peterhoeg ]; 58 }; 59}