1{ stdenv, fetchurl, buildPerlPackage, DBI, sqlite }:
2
3buildPerlPackage rec {
4 name = "DBD-SQLite-1.48";
5
6 src = fetchurl {
7 url = "mirror://cpan/authors/id/I/IS/ISHIGAKI/${name}.tar.gz";
8 sha256 = "19hf0fc4dlnpmxsxx3jjbh2z6d2jafgdlqhwz4irkp2cbl7j75xk";
9 };
10
11 propagatedBuildInputs = [ DBI ];
12
13 makeMakerFlags = "SQLITE_LOCATION=${sqlite}";
14
15 patches = [
16 # Support building against our own sqlite.
17 ./external-sqlite.patch
18 ];
19
20 preBuild =
21 ''
22 substituteInPlace Makefile --replace -L/usr/lib ""
23 '';
24
25 postInstall =
26 ''
27 # Prevent warnings from `strip'.
28 chmod -R u+w $out
29
30 # Get rid of a pointless copy of the SQLite sources.
31 rm -rf $out/lib/perl5/site_perl/*/*/auto/share
32 '';
33
34 # Disabled because the tests can randomly fail due to timeouts
35 # (e.g. "database is locked(5) at dbdimp.c line 402 at t/07busy.t").
36 doCheck = false;
37
38 meta.platforms = stdenv.lib.platforms.unix;
39}