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
|
|
|
|
, fetchPypi
|
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";
|
2023-11-04 10:01:13 +00:00
|
|
|
version = "2.1.1";
|
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}";
|
2023-11-04 10:01:13 +00:00
|
|
|
hash = "sha256-g3W6ts5Mk//l6E4Yg49rf9dmu+yzgH+mCjz+vPW9ZRQ=";
|
2022-11-13 19:13:15 +00:00
|
|
|
};
|
|
|
|
|
2023-08-29 12:03:47 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
hatchling
|
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
|
|
|
];
|
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|