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