2022-12-28 14:37:20 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
2023-04-12 10:50:57 +02:00
|
|
|
# build-system
|
|
|
|
, poetry-core
|
|
|
|
|
2022-12-28 14:37:20 +01:00
|
|
|
# runtime
|
|
|
|
, click
|
|
|
|
, peewee
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, psycopg2
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "peewee-migrate";
|
2023-06-11 13:25:03 +02:00
|
|
|
version = "1.10.1";
|
2023-04-12 10:50:57 +02:00
|
|
|
format = "pyproject";
|
2022-12-28 14:37:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klen";
|
|
|
|
repo = "peewee_migrate";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-06-11 13:25:03 +02:00
|
|
|
hash = "sha256-SBHeXHfhYjyXr+tODryKQfxZKy7l4ez5C6eU6FjS2qI=";
|
2022-12-28 14:37:20 +01:00
|
|
|
};
|
|
|
|
|
2023-04-12 10:50:57 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-12-28 14:37:20 +01:00
|
|
|
postPatch = ''
|
2023-04-12 10:50:57 +02:00
|
|
|
sed -i '/addopts/d' pyproject.toml
|
2022-12-28 14:37:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
peewee
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"peewee_migrate"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
psycopg2
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple migration engine for Peewee";
|
|
|
|
homepage = "https://github.com/klen/peewee_migrate";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|