at master 1.8 kB view raw
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 { 21 pname = "sqlbag"; 22 version = "0.1.1617247075"; 23 format = "pyproject"; 24 25 src = fetchFromGitHub { 26 owner = "djrobstep"; 27 repo = "sqlbag"; 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 62 enabledTestPaths = [ 63 "tests" 64 ]; 65 66 disabledTests = [ 67 # These all fail with "List argument must consist only of tuples or dictionaries": 68 # Related issue: https://github.com/djrobstep/sqlbag/issues/14 69 "test_basic" 70 "test_createdrop" 71 "test_errors_and_messages" 72 "test_flask_integration" 73 "test_orm_stuff" 74 "test_pendulum_for_time_types" 75 "test_transaction_separation" 76 ]; 77 78 pytestFlags = [ 79 "-x" 80 "-svv" 81 ]; 82 83 pythonImportsCheck = [ "sqlbag" ]; 84 85 meta = with lib; { 86 description = "Handy python code for doing database things"; 87 homepage = "https://github.com/djrobstep/sqlbag"; 88 license = with licenses; [ unlicense ]; 89 maintainers = with maintainers; [ bpeetz ]; 90 broken = true; # Fails to build against the current flask version 91 }; 92}