2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, sqlparse
|
|
|
|
, wrapt
|
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "embrace";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "4.2.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
vc = "hg";
|
|
|
|
owner = "~olly";
|
|
|
|
repo = "embrace-sql";
|
|
|
|
rev = "v${version}-release";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-otzpDMtC229qMXon+ydS39SBoMiXJmxn48/TQXjqu5U=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlparse
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"embrace"
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
# Some test for hot-reload fails on Darwin, but the rest of the library
|
|
|
|
# should remain usable. (https://todo.sr.ht/~olly/embrace-sql/4)
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Embrace SQL keeps your SQL queries in SQL files";
|
|
|
|
homepage = "https://pypi.org/project/embrace/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ pacien ];
|
|
|
|
};
|
|
|
|
}
|