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