1{ lib
2, buildPythonPackage
3, isPy27
4, fetchPypi
5, agate
6, sqlalchemy
7, crate
8, nose
9, geojson
10}:
11
12buildPythonPackage rec {
13 pname = "agate-sql";
14 version = "0.5.8";
15
16 disabled = isPy27;
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "581e062ae878cc087d3d0948670d46b16589df0790bf814524b0587a359f2ada";
21 };
22
23 propagatedBuildInputs = [ agate sqlalchemy ];
24
25 # crate is broken in nixpkgs, with SQLAlchemy > 1.3
26 # Skip tests for now as they rely on it.
27 doCheck = false;
28
29 checkInputs = [ crate nose geojson ];
30
31 checkPhase = ''
32 nosetests
33 '';
34
35 pythonImportsCheck = [ "agatesql" ];
36
37 meta = with lib; {
38 description = "Adds SQL read/write support to agate.";
39 homepage = "https://github.com/wireservice/agate-sql";
40 license = with licenses; [ mit ];
41 maintainers = with maintainers; [ vrthra ];
42 };
43}