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-04-21 15:54:59 +00:00
|
|
|
version = "2.1.8";
|
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";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-j9AjgLwEqt+PI4LKc3gPjXW95zAKmRjIzPFnOB0n6MM=";
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
hatchling
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
propagatedBuildInputs = 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
|
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
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "sqlite3mysql";
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
}
|