summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/interpreters/tcl/default.nix4
-rw-r--r--pkgs/development/libraries/sqlite/full.nix41
-rw-r--r--pkgs/top-level/all-packages.nix4
3 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/tcl/default.nix b/pkgs/development/interpreters/tcl/default.nix
index c9aa16ce28d44..060aa3b5a6bad 100644
--- a/pkgs/development/interpreters/tcl/default.nix
+++ b/pkgs/development/interpreters/tcl/default.nix
@@ -19,4 +19,8 @@ stdenv.mkDerivation {
     description = "The Tcl scription language";
     homepage = http://www.tcl.tk/;
   };
+  
+  passthru = {
+    libdir = "lib/tcl8.5";
+  };
 }
diff --git a/pkgs/development/libraries/sqlite/full.nix b/pkgs/development/libraries/sqlite/full.nix
new file mode 100644
index 0000000000000..83ca19866ca64
--- /dev/null
+++ b/pkgs/development/libraries/sqlite/full.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, tcl, readline ? null, ncurses ? null }:
+
+assert readline != null -> ncurses != null;
+
+stdenv.mkDerivation {
+  # I try to keep a version no newer than default.nix, and similar CFLAGS,
+  # for this to be compatible with it.
+  name = "sqlite-3.7.9-full";
+
+  src = fetchurl {
+    url = "http://www.sqlite.org/cgi/src/tarball/SQLite-3.7.9.tar.gz?uuid=version-3.7.9";
+    sha256 = "0v11slxgjpx2nv7wp8c76wk2pa1dijs9v6zlcn2dj9jblp3bx8fk";
+  };
+
+  buildInputs = [ readline ncurses ];
+  buildNativeInputs = [ tcl ];
+
+  doCheck = true;
+  checkTarget = "test";
+  
+  configureFlags = "--enable-threadsafe --enable-tempstore";
+
+  preConfigure = ''
+    export TCLLIBDIR=$out/${tcl.libdir}
+  '';
+
+  CFLAGS = "-DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1";
+  LDFLAGS = if readline != null then "-lncurses" else "";
+
+  postInstall = ''
+    make sqlite3_analyzer
+    cp sqlite3_analyzer $out/bin
+  '';
+
+  meta = {
+    homepage = http://www.sqlite.org/;
+    description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 06ef9f5d6a580..36b78385df864 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4715,6 +4715,10 @@ let
     inherit readline ncurses;
   });
 
+  sqliteFull = callPackage ../development/libraries/sqlite/full.nix {
+    inherit readline ncurses;
+  };
+
   stlport = callPackage ../development/libraries/stlport { };
 
   strigi = callPackage ../development/libraries/strigi {};