From d8ba69a16eebb64328287ac997e7f6d3019476a5 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 6 Aug 2010 08:54:27 +0000 Subject: [PATCH] added older version of sqlite for use in DBD-SQLite perl package, which fails with newest one svn path=/nixpkgs/trunk/; revision=22989 --- pkgs/development/libraries/sqlite/3.6.x.nix | 23 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++++ pkgs/top-level/perl-packages.nix | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/sqlite/3.6.x.nix diff --git a/pkgs/development/libraries/sqlite/3.6.x.nix b/pkgs/development/libraries/sqlite/3.6.x.nix new file mode 100644 index 000000000000..f700b862246b --- /dev/null +++ b/pkgs/development/libraries/sqlite/3.6.x.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, readline ? null, ncurses ? null }: + +assert readline != null -> ncurses != null; + +stdenv.mkDerivation { + name = "sqlite-3.6.23"; + + src = fetchurl { + url = "http://www.sqlite.org/sqlite-amalgamation-3.6.23.tar.gz"; + sha256 = "a5de9ec9273acabc6cb18235df802549c476410b09d58a206e02862b4dc303ae"; + }; + + 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/; + description = "A self-contained, serverless, zero-configuration, transactional SQL database engine"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e78c19362e29..9926bf5e6841 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3737,6 +3737,11 @@ let ncurses = null; }; + sqlite36 = callPackage ../development/libraries/sqlite/3.6.x.nix { + readline = null; + ncurses = null; + }; + sqliteInteractive = appendToName "interactive" (sqlite.override { inherit readline ncurses; }); diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index e14c5244d564..cdc3ef311691 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -904,7 +904,7 @@ rec { DBDSQLite = import ../development/perl-modules/DBD-SQLite { inherit fetchurl buildPerlPackage DBI; - inherit (pkgs) sqlite; + sqlite = pkgs.sqlite36; }; DBDmysql = import ../development/perl-modules/DBD-mysql {