2022-11-13 19:13:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-06-01 09:01:51 +00:00
|
|
|
, python3
|
2022-11-13 19:13:15 +00:00
|
|
|
, nixosTests
|
2023-06-01 09:01:51 +00:00
|
|
|
, testers
|
|
|
|
, sqlite3-to-mysql
|
|
|
|
, fetchPypi
|
2022-11-13 19:13:15 +00:00
|
|
|
}:
|
|
|
|
|
2023-06-01 09:01:51 +00:00
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
# sqlite3-to-mysql is incompatible with versions > 1.4.44 of sqlalchemy
|
2023-07-12 15:22:45 +00:00
|
|
|
sqlalchemy = super.sqlalchemy.overridePythonAttrs rec {
|
2023-06-01 09:01:51 +00:00
|
|
|
version = "1.4.44";
|
|
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "SQLAlchemy";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-LdpflnGa6Js+wPG3lpjYbrmuyx1U6ZCrs/3ZLAS0apA=";
|
|
|
|
};
|
2023-07-21 15:03:19 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"test/aaa_profiling"
|
|
|
|
"test/ext/mypy"
|
|
|
|
];
|
2023-07-12 15:22:45 +00:00
|
|
|
};
|
2023-06-01 09:01:51 +00:00
|
|
|
};
|
|
|
|
self = py;
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
with py.pkgs; buildPythonApplication rec {
|
2022-11-13 19:13:15 +00:00
|
|
|
pname = "sqlite3-to-mysql";
|
2023-06-01 09:01:51 +00:00
|
|
|
version = "1.4.19";
|
|
|
|
format = "pyproject";
|
2022-11-13 19:13:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "techouse";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-06-01 09:01:51 +00:00
|
|
|
hash = "sha256-gtXwDLHl5f1sXLm+b8l08bY/XJkN+zVtd7m45K0CAYY=";
|
2022-11-13 19:13:15 +00:00
|
|
|
};
|
|
|
|
|
2023-06-01 09:01:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-11-13 19:13:15 +00:00
|
|
|
click
|
|
|
|
mysql-connector
|
|
|
|
pytimeparse
|
|
|
|
pymysql
|
|
|
|
pymysqlsa
|
|
|
|
six
|
|
|
|
simplejson
|
|
|
|
sqlalchemy
|
|
|
|
sqlalchemy-utils
|
|
|
|
tqdm
|
|
|
|
tabulate
|
|
|
|
unidecode
|
|
|
|
packaging
|
|
|
|
];
|
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|