about summary refs log tree commit diff
path: root/pkgs/tools/package-management/nix/nix-perl.nix
blob: 0796a0914f1f52f655e3e7beea1c3679529bdc87 (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
{ stdenv
, lib
, perl
, pkg-config
, curl
, nix
, libsodium
, boost
, autoreconfHook
, autoconf-archive
, nlohmann_json
, Security
}:

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

  postUnpack = "sourceRoot=$sourceRoot/perl";

  buildInputs = lib.optional (stdenv.isDarwin) Security;

  # 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";
}