summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-13 22:30:30 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-14 14:27:07 +0200
commit90d5e87862fb1fea7e48159b6a50530a4bee9b62 (patch)
treefefe6b064c0fb014197e9eb0c8d8133221a23acf /pkgs/development
parente25da7e5c8bceaccb15d25dd0fcce5a0104f376d (diff)
downloadnixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar.gz
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar.bz2
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar.lz
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar.xz
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.tar.zst
nixlib-90d5e87862fb1fea7e48159b6a50530a4bee9b62.zip
sqlite: split dev and bin outputs
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/urweb/default.nix4
-rw-r--r--pkgs/development/interpreters/pypy/default.nix2
-rw-r--r--pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix4
-rw-r--r--pkgs/development/libraries/libdbi-drivers/default.nix4
-rw-r--r--pkgs/development/libraries/sqlite/default.nix2
-rw-r--r--pkgs/development/perl-modules/DBD-SQLite/default.nix4
-rw-r--r--pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch72
7 files changed, 46 insertions, 46 deletions
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index dc862940edf2..9bdc3131e6a3 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -22,12 +22,12 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     export PGHEADER="${postgresql}/include/libpq-fe.h";
     export MSHEADER="${mysql.lib}/include/mysql/mysql.h";
-    export SQHEADER="${sqlite}/include/sqlite3.h";
+    export SQHEADER="${sqlite.dev}/include/sqlite3.h";
 
     export CCARGS="-I$out/include \
                    -L${mysql.lib}/lib/mysql \
                    -L${postgresql}/lib \
-                   -L${sqlite}/lib";
+                   -L${sqlite.out}/lib";
   '';
 
   # Be sure to keep the statically linked libraries
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index 4f26a40b0ce7..c6e2c5270d53 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -54,7 +54,7 @@ let
         --replace "linklibs = ['tcl' + _ver, 'tk' + _ver]" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \
         --replace "libdirs = []" "libdirs = ['${tk}/lib', '${tcl}/lib']"
 
-      sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3_build.py
+      sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py
     '';
 
     setupHook = ./setup-hook.sh;
diff --git a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
index cbb64bc12774..29fa3454d195 100644
--- a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
+++ b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix
@@ -89,8 +89,8 @@ in
 
   sqlite3 = attrs: {
     buildFlags = [
-      "--with-sqlite3-include=${sqlite}/include"
-      "--with-sqlite3-lib=${sqlite}/lib"
+      "--with-sqlite3-include=${sqlite.dev}/include"
+      "--with-sqlite3-lib=${sqlite.out}/lib"
     ];
   };
 
diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix
index ccc0a1996549..da2919f6ee9b 100644
--- a/pkgs/development/libraries/libdbi-drivers/default.nix
+++ b/pkgs/development/libraries/libdbi-drivers/default.nix
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
     "--with-pgsql_libdir=${postgresql}/lib"
   ] ++ optionals (sqlite != null) [
     "--with-sqlite3"
-    "--with-sqlite3-incdir=${sqlite}/include/sqlite"
-    "--with-sqlite3-libdir=${sqlite}/lib/sqlite"
+    "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
+    "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
   ];
 
   installFlags = [ "DESTDIR=\${out}" ];
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index f043a37033a8..d1a6a341d872 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -10,6 +10,8 @@ stdenv.mkDerivation {
     sha1 = "d0e22d7e361b6f50830a3cdeafe35311443f8f9a";
   };
 
+  outputs = [ "dev" "out" "bin" ];
+
   buildInputs = lib.optionals interactive [ readline ncurses ];
 
   configureFlags = [ "--enable-threadsafe" ];
diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix
index 985e7946b6b4..13b633f4704e 100644
--- a/pkgs/development/perl-modules/DBD-SQLite/default.nix
+++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix
@@ -17,6 +17,10 @@ buildPerlPackage rec {
     ./external-sqlite.patch
   ];
 
+  sqlite_dev = sqlite.dev;
+  sqlite_out = sqlite.out;
+  postPatch = "substituteAllInPlace Makefile.PL; cat Makefile.PL";
+
   preBuild =
     ''
       substituteInPlace Makefile --replace -L/usr/lib ""
diff --git a/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch
index 9a20fa250399..1f90546b252c 100644
--- a/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch
+++ b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch
@@ -1,39 +1,33 @@
-diff -rc DBD-SQLite-1.29/Makefile.PL DBD-SQLite-1.29-new/Makefile.PL
-*** DBD-SQLite-1.29/Makefile.PL	2010-01-08 10:08:29.000000000 +0100
---- DBD-SQLite-1.29-new/Makefile.PL	2010-08-05 11:42:53.000000000 +0200
-***************
-*** 123,129 ****
-  # a system sqlite is also sophisticated enough to have a patching system
-  # that can change the if ( 0 ) to if ( 1 )
-  my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
-! if ( 0 ) {
-  	require File::Spec;
-  	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
-  		$sqlite_base =~ /=(.*)/;
---- 123,129 ----
-  # a system sqlite is also sophisticated enough to have a patching system
-  # that can change the if ( 0 ) to if ( 1 )
-  my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
-! if ( 1 ) {
-  	require File::Spec;
-  	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
-  		$sqlite_base =~ /=(.*)/;
-***************
-*** 184,191 ****
-  } else {
-  	# Always the bundled one.
-  	# XXX: ... and this message should be more informative.
-! 	$sqlite_local = 1;
-! 	print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
-  }
-  
-  @ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
---- 184,191 ----
-  } else {
-  	# Always the bundled one.
-  	# XXX: ... and this message should be more informative.
-! #	$sqlite_local = 1;
-! #	print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
-  }
-  
-  @ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
+diff --git a/Makefile.PL b/Makefile.PL
+index 606b28d..0cea060 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -128,24 +128,10 @@ SCOPE: {
+ # the system SQLite. We expect that anyone sophisticated enough to use
+ # a system sqlite is also sophisticated enough to have a patching system
+ # that can change the if ( 0 ) to if ( 1 )
+-my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
+-if ( 0 ) {
+-	require File::Spec;
+-	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
+-		$sqlite_base =~ /=(.*)/;
+-		$sqlite_base = $1;
+-		$sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib'     );
+-		$sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
+-	}
+-	if ( $sqlite_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
+-		$sqlite_local =~ /=(.*)/;
+-		$sqlite_local = "$1" ? 1 : 0;
+-		if ( $sqlite_local ) {
+-			# Keep these from making into CFLAGS/LDFLAGS
+-			undef $sqlite_lib;
+-			undef $sqlite_inc;
+-		}
+-	}
++my ($sqlite_local, $sqlite_lib, $sqlite_inc);
++if ( 1 ) {
++		$sqlite_lib = '@sqlite_out@/lib';
++		$sqlite_inc = '@sqlite_dev@/include';
+ 
+ 	# Now check for a compatible sqlite3
+ 	unless ( $sqlite_local ) {