nixpkgs/pkgs/by-name/sq/sqlite3-to-mysql/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

70 lines
1.4 KiB
Nix

{ lib
, fetchFromGitHub
, python3Packages
, nixosTests
, testers
, sqlite3-to-mysql
, mysql80
}:
python3Packages.buildPythonApplication rec {
pname = "sqlite3-to-mysql";
version = "2.3.1";
format = "pyproject";
disabled = python3Packages.pythonOlder "3.8";
src = fetchFromGitHub {
owner = "techouse";
repo = "sqlite3-to-mysql";
rev = "refs/tags/v${version}";
hash = "sha256-13NLtP9gDd9hrwY09+7CuM4Rl+Hce82TETdfwBC/5HI=";
};
build-system = with python3Packages; [
hatchling
];
dependencies = with python3Packages; [
click
mysql-connector
pytimeparse2
pymysql
pymysqlsa
simplejson
sqlalchemy
sqlalchemy-utils
tqdm
tabulate
unidecode
packaging
mysql80
python-dateutil
types-python-dateutil
];
pythonRelaxDeps = [
"mysql-connector-python"
];
# tests require a mysql server instance
doCheck = false;
# run package tests as a separate nixos test
passthru.tests = {
nixosTest = nixosTests.sqlite3-to-mysql;
version = testers.testVersion {
package = sqlite3-to-mysql;
command = "sqlite3mysql --version";
};
};
meta = {
description = "Simple Python tool to transfer data from SQLite 3 to MySQL";
homepage = "https://github.com/techouse/sqlite3-to-mysql";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gador ];
mainProgram = "sqlite3mysql";
};
}