2022-11-13 19:13:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-08-29 12:03:47 +00:00
|
|
|
, python3Packages
|
2022-11-13 19:13:15 +00:00
|
|
|
, nixosTests
|
2023-06-01 09:01:51 +00:00
|
|
|
, testers
|
|
|
|
, sqlite3-to-mysql
|
2023-08-29 12:03:47 +00:00
|
|
|
, mysql80
|
2022-11-13 19:13:15 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-29 12:03:47 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-11-13 19:13:15 +00:00
|
|
|
pname = "sqlite3-to-mysql";
|
2024-01-14 19:07:52 +00:00
|
|
|
version = "2.1.7";
|
2023-06-01 09:01:51 +00:00
|
|
|
format = "pyproject";
|
2022-11-13 19:13:15 +00:00
|
|
|
|
2023-11-04 10:01:13 +00:00
|
|
|
disabled = python3Packages.pythonOlder "3.8";
|
2023-08-29 12:03:47 +00:00
|
|
|
|
2022-11-13 19:13:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "techouse";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-14 19:07:52 +00:00
|
|
|
hash = "sha256-TglHny0HgVth3o73GQYddh9sdyQ0L+4J4dJBAeJToiM=";
|
2022-11-13 19:13:15 +00:00
|
|
|
};
|
|
|
|
|
2023-08-29 12:03:47 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
hatchling
|
2024-01-14 19:07:52 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-06-01 09:01:51 +00:00
|
|
|
];
|
|
|
|
|
2023-08-29 12:03:47 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2022-11-13 19:13:15 +00:00
|
|
|
click
|
|
|
|
mysql-connector
|
2023-08-29 12:03:47 +00:00
|
|
|
pytimeparse2
|
2022-11-13 19:13:15 +00:00
|
|
|
pymysql
|
|
|
|
pymysqlsa
|
|
|
|
simplejson
|
|
|
|
sqlalchemy
|
|
|
|
sqlalchemy-utils
|
|
|
|
tqdm
|
|
|
|
tabulate
|
|
|
|
unidecode
|
|
|
|
packaging
|
2023-08-29 12:03:47 +00:00
|
|
|
mysql80
|
2022-11-13 19:13:15 +00:00
|
|
|
];
|
|
|
|
|
2024-01-14 19:07:52 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"mysql-connector-python"
|
|
|
|
];
|
|
|
|
|
2022-11-13 19:13:15 +00:00
|
|
|
# tests require a mysql server instance
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-18 00:39:44 +00:00
|
|
|
# run package tests as a separate nixos test
|
2022-11-13 19:13:15 +00:00
|
|
|
passthru.tests = {
|
|
|
|
nixosTest = nixosTests.sqlite3-to-mysql;
|
2023-06-01 09:01:51 +00:00
|
|
|
version = testers.testVersion {
|
|
|
|
package = sqlite3-to-mysql;
|
|
|
|
command = "sqlite3mysql --version";
|
|
|
|
};
|
2022-11-13 19:13:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple Python tool to transfer data from SQLite 3 to MySQL";
|
|
|
|
homepage = "https://github.com/techouse/sqlite3-to-mysql";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gador ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "sqlite3mysql";
|
2022-11-13 19:13:15 +00:00
|
|
|
};
|
|
|
|
}
|