1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 poetry-core,
9
10 # runtime
11 click,
12 peewee,
13
14 # tests
15 psycopg2,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "peewee-migrate";
21 version = "1.13.0";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "klen";
28 repo = "peewee_migrate";
29 tag = version;
30 hash = "sha256-sC63WH/4EmoQYfvl3HyBHDzT/jMZW/G7mTC138+ZHHU=";
31 };
32
33 postPatch = ''
34 sed -i '/addopts/d' pyproject.toml
35 '';
36
37 nativeBuildInputs = [ poetry-core ];
38
39 propagatedBuildInputs = [
40 peewee
41 click
42 ];
43
44 pythonImportsCheck = [ "peewee_migrate" ];
45
46 nativeCheckInputs = [
47 psycopg2
48 pytestCheckHook
49 ];
50
51 disabledTests = [
52 # sqlite3.OperationalError: error in table order after drop column...
53 "test_migrator"
54 ];
55
56 meta = with lib; {
57 description = "Simple migration engine for Peewee";
58 homepage = "https://github.com/klen/peewee_migrate";
59 license = licenses.bsd3;
60 maintainers = with maintainers; [ hexa ];
61 };
62}