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";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
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";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-R6Ug4f8KFZNzaNWqWZkLvOwtsawCuerzvHlysr7bd6M=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlparse
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|