nixpkgs/pkgs/development/python-modules/pgspecial/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00

68 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
click,
configobj,
fetchPypi,
postgresql,
postgresqlTestHook,
psycopg,
pytestCheckHook,
setuptools,
setuptools-scm,
sqlparse,
stdenv,
}:
buildPythonPackage rec {
pname = "pgspecial";
version = "2.2.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-2mx/zHvve7ATLcIEb3TsZROx/m8MgOVSjWMNFLfEhJ0=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
click
sqlparse
psycopg
];
# postgresqlTestHook is not available on Darwin
doCheck = stdenv.hostPlatform.isLinux;
nativeCheckInputs = [
configobj
pytestCheckHook
postgresqlTestHook
postgresql
];
pytestFlagsArray = [ "-vvv" ];
env = {
PGDATABASE = "_test_db";
PGUSER = "postgres";
};
disabledTests = [
"test_slash_d_view_verbose"
"test_slash_ddp"
"test_slash_ddp_pattern"
];
meta = {
description = "Meta-commands handler for Postgres Database";
homepage = "https://github.com/dbcli/pgspecial";
changelog = "https://github.com/dbcli/pgspecial/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.SuperSandro2000 ];
};
}