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 meta = {
49 description = "Simple migration engine for Peewee";
50 homepage = "https://github.com/klen/peewee_migrate";
51 license = lib.licenses.bsd3;
52 maintainers = with lib.maintainers; [ hexa ];
53 };
54}