Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, click 4, faker 5, fetchFromGitHub 6, flask 7, gunicorn 8, pyopenssl 9, pytestCheckHook 10, pythonOlder 11, setuptools-scm 12, requests 13}: 14 15buildPythonPackage rec { 16 pname = "threat9-test-bed"; 17 version = "0.6.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "threat9"; 24 repo = pname; 25 rev = "v${version}"; 26 hash = "sha256-0YSjMf2gDdrvkDaT77iwfCkiDDXKHnZyI8d7JmBSuCg="; 27 }; 28 29 SETUPTOOLS_SCM_PRETEND_VERSION = version; 30 31 nativeBuildInputs = [ 32 setuptools-scm 33 ]; 34 35 propagatedBuildInputs = [ 36 click 37 faker 38 flask 39 gunicorn 40 pyopenssl 41 requests 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ]; 47 48 pythonImportsCheck = [ 49 "threat9_test_bed" 50 ]; 51 52 disabledTests = [ 53 # Assertion issue with the response codes 54 "test_http_service_mock" 55 "tests_http_service_mock" 56 "test_http_service_mock_random_port" 57 ]; 58 59 meta = with lib; { 60 description = "Module for adding unittests.mock as view functions"; 61 homepage = "https://github.com/threat9/threat9-test-bed"; 62 license = licenses.bsd3; 63 maintainers = with maintainers; [ fab ]; 64 }; 65}