commit ac297b97d6e4e51c05aa1e05dcbd5436cf40675a parent 7a4d70ff2e5939c7795c8e2ba0a52d9764957e9a Author: Nikolay Korotkiy <sikmir@disroot.org> Date: Thu, 9 Nov 2023 20:48:23 +0400 Add mysql-to-sqlite3 Diffstat:
M | pkgs/default.nix | | | 1 | + |
A | pkgs/misc/mysql-to-sqlite3/default.nix | | | 35 | +++++++++++++++++++++++++++++++++++ |
2 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -365,6 +365,7 @@ lib.makeScope newScope ( modbus_sim_cli = callPackage ./misc/modbus_sim_cli { }; morse-talk = callPackage ./misc/morse-talk { }; musig = callPackage ./misc/musig { }; + mysql-to-sqlite3 = callPackage ./misc/mysql-to-sqlite3 { }; nanodns = callPackage ./misc/nanodns { }; nmtree = callPackage ./misc/nmtree { }; objlab = callPackage ./misc/objlab { }; diff --git a/pkgs/misc/mysql-to-sqlite3/default.nix b/pkgs/misc/mysql-to-sqlite3/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "mysql-to-sqlite3"; + version = "2.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "techouse"; + repo = "mysql-to-sqlite3"; + rev = "v${version}"; + hash = "sha256-MXOkR7eDxCtRptEYPrkmtpkxyQh/RfNAzb7MKYt8p20="; + }; + + nativeBuildInputs = with python3Packages; [ hatchling ]; + + propagatedBuildInputs = with python3Packages; [ + click + mysql-connector + python-slugify + pytimeparse2 + simplejson + tabulate + tqdm + typing-extensions + ]; + + meta = with lib; { + description = "Transfer data from MySQL to SQLite"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + mainProgram = "mysql2sqlite"; + }; +}