8 buildPythonPackage rec {
13 inherit pname version;
14 sha256 = "17d3335863e8cf8392eea71add33dab3f96d060666fe68ab7382469d307f4490";
17 # Need to use the builtin sqlite3 on Python 3
20 # Since the `.egg' file is zipped, the `NEEDED' of the `.so' files
21 # it contains is not taken into account. Thus, we must explicitly make
22 # it a propagated input.
23 propagatedBuildInputs = [ pkgs.sqlite ];
26 substituteInPlace "setup.cfg" \
27 --replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \
28 --replace "/usr/local/lib" "${pkgs.sqlite.out}/lib"
29 ${lib.optionalString (!stdenv.isDarwin) ''export LDSHARED="$CC -pthread -shared"''}
33 homepage = "https://pysqlite.org/";
34 description = "Python bindings for the SQLite embedded relational database engine";
36 pysqlite is a DB-API 2.0-compliant database interface for SQLite.
38 SQLite is a relational database management system contained in
39 a relatively small C library. It is a public domain project
40 created by D. Richard Hipp. Unlike the usual client-server
41 paradigm, the SQLite engine is not a standalone process with
42 which the program communicates, but is linked in and thus
43 becomes an integral part of the program. The library
44 implements most of SQL-92 standard, including transactions,
45 triggers and most of complex queries.
47 pysqlite makes this powerful embedded SQL engine available to
48 Python programmers. It stays compatible with the Python
49 database API specification 2.0 as much as possible, but also
50 exposes most of SQLite's native API, so that it is for example
51 possible to create user-defined SQL functions and aggregates
54 license = licenses.bsd3;