1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, sqlalchemy
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "sqlalchemy-views";
11 version = "0.3.2";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 repo = pname;
16 owner = "jklukas";
17 rev = "refs/tags/v${version}";
18 hash = "sha256-MJgikWXo3lpMsSYbb5sOSOTbJPOx5gEghW1V9jKvHKU=";
19 };
20
21 postPatch = ''
22 substituteInPlace tox.ini --replace '--cov=sqlalchemy_views --cov-report=term' ""
23 '';
24
25 nativeBuildInputs = [
26 setuptools
27 ];
28
29 propagatedBuildInputs = [
30 sqlalchemy
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [
38 "sqlalchemy_views"
39 ];
40
41 meta = with lib; {
42 description = "Adds CreateView and DropView constructs to SQLAlchemy";
43 homepage = "https://github.com/jklukas/sqlalchemy-views";
44 license = licenses.mit;
45 maintainers = with maintainers; [ cpcloud ];
46 };
47}