From 4193cac8de47eb56d13c014b3ef56720fdc68da3 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 4 Feb 2010 16:07:15 +0000 Subject: [PATCH] Added an interactive variant of sqlite3 that has readline support enabled. svn path=/nixpkgs/trunk/; revision=19823 --- pkgs/development/libraries/sqlite/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index c869ac7daba8..3e9d2804ced0 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -1,6 +1,8 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, readline ? null, ncurses ? null }: -stdenv.mkDerivation rec { +assert readline != null -> ncurses != null; + +stdenv.mkDerivation { name = "sqlite-3.6.22"; src = fetchurl { @@ -8,9 +10,11 @@ stdenv.mkDerivation rec { sha256 = "1k5qyl0v2y4fpkh7vvxvb0irpnl71g0ffhfc3ksm40mrhcdq9qk8"; }; + buildInputs = [readline ncurses]; configureFlags = "--enable-threadsafe"; NIX_CFLAGS_COMPILE = "-DSQLITE_ENABLE_COLUMN_METADATA=1"; + NIX_CFLAGS_LINK = if readline != null then "-lncurses" else ""; meta = { homepage = http://www.sqlite.org/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eedeaaac1ffb..d5b0a8ee5f51 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4682,9 +4682,13 @@ let inherit fetchurl stdenv libogg; }; - sqlite = import ../development/libraries/sqlite { + sqlite = lowPrio (import ../development/libraries/sqlite { inherit fetchurl stdenv; - }; + }); + + sqliteInteractive = appendToName "interactive" (import ../development/libraries/sqlite { + inherit fetchurl stdenv readline ncurses; + }); stlport = import ../development/libraries/stlport { inherit fetchurl stdenv;