2022-12-02 08:20:57 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, python3Packages
|
2022-12-02 08:20:57 +00:00
|
|
|
, nixosTests
|
2023-07-15 17:15:38 +00:00
|
|
|
, testers
|
|
|
|
, sqlite3-to-mysql
|
2023-10-09 19:29:22 +00:00
|
|
|
, mysql80
|
2022-12-02 08:20:57 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-12-02 08:20:57 +00:00
|
|
|
pname = "sqlite3-to-mysql";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.3.1";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = python3Packages.pythonOlder "3.8";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "techouse";
|
2024-07-31 10:19:44 +00:00
|
|
|
repo = "sqlite3-to-mysql";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-13NLtP9gDd9hrwY09+7CuM4Rl+Hce82TETdfwBC/5HI=";
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
build-system = with python3Packages; [
|
2023-10-09 19:29:22 +00:00
|
|
|
hatchling
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
dependencies = with python3Packages; [
|
2022-12-02 08:20:57 +00:00
|
|
|
click
|
|
|
|
mysql-connector
|
2023-10-09 19:29:22 +00:00
|
|
|
pytimeparse2
|
2022-12-02 08:20:57 +00:00
|
|
|
pymysql
|
|
|
|
pymysqlsa
|
|
|
|
simplejson
|
|
|
|
sqlalchemy
|
|
|
|
sqlalchemy-utils
|
|
|
|
tqdm
|
|
|
|
tabulate
|
|
|
|
unidecode
|
|
|
|
packaging
|
2023-10-09 19:29:22 +00:00
|
|
|
mysql80
|
2024-07-31 10:19:44 +00:00
|
|
|
python-dateutil
|
|
|
|
types-python-dateutil
|
2022-12-02 08:20:57 +00:00
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"mysql-connector-python"
|
|
|
|
];
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
# tests require a mysql server instance
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# run package tests as a separate nixos test
|
2022-12-02 08:20:57 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixosTest = nixosTests.sqlite3-to-mysql;
|
2023-07-15 17:15:38 +00:00
|
|
|
version = testers.testVersion {
|
|
|
|
package = sqlite3-to-mysql;
|
|
|
|
command = "sqlite3mysql --version";
|
|
|
|
};
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple Python tool to transfer data from SQLite 3 to MySQL";
|
2022-12-02 08:20:57 +00:00
|
|
|
homepage = "https://github.com/techouse/sqlite3-to-mysql";
|
2024-07-31 10:19:44 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ gador ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "sqlite3mysql";
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
}
|