mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 16:36:38 +01:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
mbstrdecoder,
|
|
setuptools,
|
|
setuptools-scm,
|
|
simplesqlite,
|
|
sqliteschema,
|
|
tabledata,
|
|
typepy,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sqliteschema";
|
|
version = "2.0.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "thombashi";
|
|
repo = "sqliteschema";
|
|
tag = "v${version}";
|
|
hash = "sha256-ZGDzGfj78v8o0GvAHcP26JiJCOWPaIr2h1Lqzh5AuSg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
mbstrdecoder
|
|
tabledata
|
|
typepy
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
simplesqlite
|
|
sqliteschema
|
|
];
|
|
|
|
pythonImportsCheck = [ "sqliteschema" ];
|
|
|
|
# Enabling tests would trigger infinite recursion due to circular
|
|
# dependency between this package and simplesqlite.
|
|
# Therefore, we enable tests only when building passthru.tests.
|
|
doCheck = false;
|
|
passthru.tests.pytest = sqliteschema.overridePythonAttrs (_: {
|
|
doCheck = true;
|
|
});
|
|
|
|
meta = {
|
|
description = "Python library to dump table schema of a SQLite database file";
|
|
homepage = "https://github.com/thombashi/sqliteschema";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ henrirosten ];
|
|
};
|
|
}
|