about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sqlalchemy-jsonfield/default.nix
blob: 54962387967d12f24b3c934d47ca4117aded79db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, buildPythonPackage
, fetchFromGitHub
, sqlalchemy
, setuptools-scm
, setuptools
, tox
, sphinx
, pytest
, pytest-cov
, pytest-html
, pytest-sugar
, coverage
, pymysql
, psycopg2 }:

buildPythonPackage rec {
  pname = "sqlalchemy-jsonfield";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "penguinolog";
    repo = "sqlalchemy_jsonfield";
    rev = version;
    sha256 = "015pl4z84spfw8389hk1szlm37jgw2basvbmzmkacdqi0685zx24";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";

  nativeBuildInputs = [ setuptools-scm ];
  propagatedBuildInputs = [ sqlalchemy setuptools ];
  checkInputs = [ tox sphinx pytest pytest-cov pytest-html pytest-sugar coverage pymysql psycopg2 ];

  checkPhase = ''
    TOX_TESTENV_PASSENV="PYTHONPATH SETUPTOOLS_SCM_PRETEND_VERSION" tox -e functional
  '';

  meta = with lib; {
    homepage = "https://github.com/penguinolog/sqlalchemy_jsonfield";
    description = "SQLALchemy JSONField implementation for storing dicts at SQL independently from JSON type support";
    license = licenses.asl20;
    maintainers = [ maintainers.ivan-tkatchev ];
  };
}