2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
poetry-core,
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
click,
|
|
|
|
peewee,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
psycopg2,
|
|
|
|
pytestCheckHook,
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "peewee-migrate";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.12.2";
|
2023-04-12 12:48:02 +00:00
|
|
|
format = "pyproject";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klen";
|
|
|
|
repo = "peewee_migrate";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-jxM2cvlDsoiUlVoxdS3wpUKlwMveMraiR431A8kIdgI=";
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
sed -i '/addopts/d' pyproject.toml
|
2023-02-09 11:40:11 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
peewee
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "peewee_migrate" ];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
psycopg2
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# sqlite3.OperationalError: error in table order after drop column...
|
|
|
|
"test_migrator"
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple migration engine for Peewee";
|
|
|
|
homepage = "https://github.com/klen/peewee_migrate";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|