nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 62 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 wheel, 7 8 psycopg, 9 aiosqlite, 10 asyncmy, 11 12 # test 13 pytest-asyncio, 14 pytest-cov-stub, 15 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "mayim"; 21 version = "1.3.1"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "ahopkins"; 26 repo = "mayim"; 27 tag = "v${version}"; 28 hash = "sha256-RJMPqqmvpwvdRTaVznxGunvC0/KlL0z1GUX1VBTCbwo="; 29 }; 30 31 build-system = [ 32 setuptools 33 wheel 34 ]; 35 36 optional-dependencies = { 37 postgres = [ psycopg ] ++ psycopg.optional-dependencies.pool; 38 mysql = [ asyncmy ]; 39 sqlite = [ aiosqlite ]; 40 }; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 pytest-asyncio 45 pytest-cov-stub 46 ] 47 ++ (with optional-dependencies; [ 48 postgres 49 mysql 50 sqlite 51 ]); 52 53 pythonImportsCheck = [ "mayim" ]; 54 55 meta = { 56 description = "Asynchronous SQL hydrator"; 57 homepage = "https://github.com/ahopkins/mayim"; 58 changelog = "https://github.com/ahopkins/mayim/releases/tag/${src.tag}"; 59 license = lib.licenses.mit; 60 maintainers = with lib.maintainers; [ huyngo ]; 61 }; 62}