summary refs log tree commit diff
path: root/pkgs/development/perl-modules/DB_File/default.nix
blob: 4017d8f5ca5365e288a4de79e93d5f162a6c1820 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{fetchurl, buildPerlPackage, db4}:

buildPerlPackage rec {
  name = "DB_File-1.831";

  src = fetchurl {
    url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
    sha256 = "0hq2vvcsa3nkb5bpcl0nkfsxhk8wyrsp3p3ara18rscrfd783hjs";
  };

  preConfigure = ''
    cat > config.in <<EOF
    PREFIX = size_t
    HASH = u_int32_t
    LIB = ${db4}/lib
    INCLUDE = ${db4}/include
    EOF
  '';

  # I don't know about perl paths, but PERL5LIB env var is managed through
  # lib/perl5/site_perl, and the *.pm should be inside lib/perl5/site_perl/...
  # for other packages to get that in the PERL5LIB env var.
  postInstall = ''
    mkdir -p $out/lib/perl5/site_perl/
    cp -R $out/lib/perl5/5* $out/lib/perl5/site_perl
  '';
}