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