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