Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 psycopg2, 6 pymysql, 7 sqlalchemy, 8 six, 9 flask, 10 pendulum, 11 packaging, 12 setuptools, 13 poetry-core, 14 pytestCheckHook, 15 pytest-xdist, 16 pytest-sugar, 17 postgresql, 18 postgresqlTestHook, 19}: 20buildPythonPackage rec { 21 pname = "sqlbag"; 22 version = "0.1.1617247075"; 23 format = "pyproject"; 24 25 src = fetchFromGitHub { 26 owner = "djrobstep"; 27 repo = pname; 28 # no tags on github, version patch number is unix time. 29 rev = "eaaeec4158ffa139fba1ec30d7887f4d836f4120"; 30 hash = "sha256-lipgnkqrzjzqwbhtVcWDQypBNzq6Dct/qoM8y/FNiNs="; 31 }; 32 33 nativeBuildInputs = [ poetry-core ]; 34 35 propagatedBuildInputs = [ 36 sqlalchemy 37 six 38 packaging 39 40 psycopg2 41 pymysql 42 43 setuptools # needed for 'pkg_resources' 44 ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 pytest-xdist 49 pytest-sugar 50 51 postgresql 52 postgresqlTestHook 53 54 flask 55 pendulum 56 ]; 57 58 preCheck = '' 59 export PGUSER="nixbld"; 60 ''; 61 disabledTests = [ 62 # These all fail with "List argument must consist only of tuples or dictionaries": 63 # Related issue: https://github.com/djrobstep/sqlbag/issues/14 64 "test_basic" 65 "test_createdrop" 66 "test_errors_and_messages" 67 "test_flask_integration" 68 "test_orm_stuff" 69 "test_pendulum_for_time_types" 70 "test_transaction_separation" 71 ]; 72 73 pytestFlagsArray = [ 74 "-x" 75 "-svv" 76 "tests" 77 ]; 78 79 pythonImportsCheck = [ "sqlbag" ]; 80 81 meta = with lib; { 82 description = "Handy python code for doing database things"; 83 homepage = "https://github.com/djrobstep/sqlbag"; 84 license = with licenses; [ unlicense ]; 85 maintainers = with maintainers; [ soispha ]; 86 broken = true; # Fails to build against the current flask version 87 }; 88}