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