about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/package-management/nix/nix-perl.nix
blob: 069a22d3a853f994b86eed8f6e38bff887c4927a (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ stdenv
, perl
, pkg-config
, curl
, nix
, libsodium
, boost
, autoreconfHook
, autoconf-archive
, nlohmann_json

, version
, src
}:

stdenv.mkDerivation {
  pname = "nix-perl";
  inherit version src;

  postUnpack = "sourceRoot=$sourceRoot/perl";

  # This is not cross-compile safe, don't have time to fix right now
  # but noting for future travellers.
  nativeBuildInputs = [
    autoconf-archive
    autoreconfHook
    boost
    curl
    libsodium
    nix
    nlohmann_json
    perl
    pkg-config
  ];

  configureFlags = [
    "--with-dbi=${perl.pkgs.DBI}/${perl.libPrefix}"
    "--with-dbd-sqlite=${perl.pkgs.DBDSQLite}/${perl.libPrefix}"
  ];

  preConfigure = "export NIX_STATE_DIR=$TMPDIR";

  preBuild = "unset NIX_INDENT_MAKE";
}