nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, sqlite
6, isPyPy
7, python
8}:
9
10buildPythonPackage rec {
11 pname = "apsw";
12 version = "3.38.1-r1";
13 format = "setuptools";
14
15 disabled = isPyPy;
16
17 src = fetchFromGitHub {
18 owner = "rogerbinns";
19 repo = "apsw";
20 rev = version;
21 hash = "sha256-pbb6wCu1T1mPlgoydB1Y1AKv+kToGkdVUjiom2vTqf4=";
22 };
23
24 buildInputs = [
25 sqlite
26 ];
27
28 # Project uses custom test setup to exclude some tests by default, so using pytest
29 # requires more maintenance
30 # https://github.com/rogerbinns/apsw/issues/335
31 checkPhase = ''
32 ${python.interpreter} setup.py test
33 '';
34
35 pythonImportsCheck = [
36 "apsw"
37 ];
38
39 meta = with lib; {
40 description = "A Python wrapper for the SQLite embedded relational database engine";
41 homepage = "https://github.com/rogerbinns/apsw";
42 license = licenses.zlib;
43 maintainers = with maintainers; [ gador ];
44 };
45}