2009-11-04 13:07:21 +00:00
|
|
|
{stdenv, fetchurl, readline, tcl, static ? false}:
|
2006-04-22 18:08:37 +00:00
|
|
|
|
2009-03-12 12:56:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2009-11-04 13:07:21 +00:00
|
|
|
name = "sqlite-3.6.19";
|
2008-06-17 09:39:38 +00:00
|
|
|
|
|
|
|
|
# Note: don't use the "amalgamation" source release, since it
|
|
|
|
|
# doesn't install sqlite3.pc.
|
2007-03-21 19:25:58 +00:00
|
|
|
src = fetchurl {
|
2009-03-12 12:56:55 +00:00
|
|
|
url = "http://www.sqlite.org/${name}.tar.gz";
|
2009-11-04 13:07:21 +00:00
|
|
|
sha256 = "7d8649c44fb97b874aa59144faaeb2356ec1fc6a8a7baa1d16e9ff5f1e097003";
|
2008-06-17 09:39:38 +00:00
|
|
|
};
|
2008-08-29 13:53:28 +00:00
|
|
|
|
2009-11-04 13:07:21 +00:00
|
|
|
buildInputs = [readline tcl];
|
2008-08-29 13:53:28 +00:00
|
|
|
|
2009-03-24 10:31:17 +00:00
|
|
|
configureFlags = ''
|
2009-11-04 13:07:27 +00:00
|
|
|
CFLAGS=-O3
|
2009-07-02 13:56:06 +00:00
|
|
|
--enable-load-extension
|
2009-04-21 23:18:09 +00:00
|
|
|
${if static then "--disable-shared --enable-static" else ""}
|
2009-11-04 13:07:27 +00:00
|
|
|
--enable-amalgamation
|
2009-07-06 10:39:52 +00:00
|
|
|
--enable-threadsafe
|
|
|
|
|
--disable-cross-thread-connections
|
|
|
|
|
--disable-tcl
|
|
|
|
|
--disable-tempstore
|
2009-03-24 10:31:17 +00:00
|
|
|
--with-readline-inc=-I${readline}/include
|
|
|
|
|
'';
|
2009-03-12 12:56:55 +00:00
|
|
|
|
2009-07-02 13:56:06 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-DSQLITE_ENABLE_COLUMN_METADATA=1";
|
|
|
|
|
NIX_CFLAGS_LINK = "-ldl"; # needed for --enable-load-extension
|
|
|
|
|
|
2008-06-17 09:39:38 +00:00
|
|
|
meta = {
|
|
|
|
|
homepage = http://www.sqlite.org/;
|
|
|
|
|
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
|
2007-03-21 19:25:58 +00:00
|
|
|
};
|
2006-04-22 18:08:37 +00:00
|
|
|
}
|