1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromSourcehut,
6 pytestCheckHook,
7 pythonOlder,
8 sqlparse,
9 wrapt,
10}:
11
12buildPythonPackage rec {
13 pname = "embrace";
14 version = "4.2.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromSourcehut {
20 vc = "hg";
21 owner = "~olly";
22 repo = "embrace-sql";
23 rev = "v${version}-release";
24 hash = "sha256-B/xW5EfaQWW603fjKYcf+RHQJVZrnFoqVnIl6xSwS0E=";
25 };
26
27 propagatedBuildInputs = [
28 sqlparse
29 wrapt
30 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "embrace" ];
35
36 # Some test for hot-reload fails on Darwin, but the rest of the library
37 # should remain usable. (https://todo.sr.ht/~olly/embrace-sql/4)
38 doCheck = !stdenv.hostPlatform.isDarwin;
39
40 meta = with lib; {
41 description = "Embrace SQL keeps your SQL queries in SQL files";
42 homepage = "https://pypi.org/project/embrace/";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ euxane ];
45 };
46}